basement-0.0.16: Foundation scrap box of array & string
LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Basement.Compat.IsList

Description

compat friendly version of IsList

Documentation

class IsList l where #

Minimal complete definition

fromList, toList

Associated Types

type Item l #

Methods

fromList :: [Item l] -> l #

fromListN :: Int -> [Item l] -> l #

toList :: l -> [Item l] #

Instances

Instances details
IsList ByteArray 
Instance details

Defined in Data.Array.Byte

Associated Types

type Item ByteArray 
Instance details

Defined in Data.Array.Byte

type Item ByteArray = Word8

Methods

fromList :: [Item ByteArray] -> ByteArray #

fromListN :: Int -> [Item ByteArray] -> ByteArray #

toList :: ByteArray -> [Item ByteArray] #

IsList AsciiString Source # 
Instance details

Defined in Basement.Types.AsciiString

Associated Types

type Item AsciiString 
Instance details

Defined in Basement.Types.AsciiString

IsList String Source # 
Instance details

Defined in Basement.UTF8.Base

Associated Types

type Item String 
Instance details

Defined in Basement.UTF8.Base

IsList Version 
Instance details

Defined in GHC.Internal.IsList

Associated Types

type Item Version 
Instance details

Defined in GHC.Internal.IsList

type Item Version = Int

Methods

fromList :: [Item Version] -> Version #

fromListN :: Int -> [Item Version] -> Version #

toList :: Version -> [Item Version] #

IsList CallStack 
Instance details

Defined in GHC.Internal.IsList

Associated Types

type Item CallStack 
Instance details

Defined in GHC.Internal.IsList

type Item CallStack = (String, SrcLoc)

Methods

fromList :: [Item CallStack] -> CallStack #

fromListN :: Int -> [Item CallStack] -> CallStack #

toList :: CallStack -> [Item CallStack] #

PrimType ty => IsList (Block ty) Source # 
Instance details

Defined in Basement.Block.Base

Associated Types

type Item (Block ty) 
Instance details

Defined in Basement.Block.Base

type Item (Block ty) = ty

Methods

fromList :: [Item (Block ty)] -> Block ty #

fromListN :: Int -> [Item (Block ty)] -> Block ty #

toList :: Block ty -> [Item (Block ty)] #

IsList (Array ty) Source # 
Instance details

Defined in Basement.BoxedArray

Associated Types

type Item (Array ty) 
Instance details

Defined in Basement.BoxedArray

type Item (Array ty) = ty

Methods

fromList :: [Item (Array ty)] -> Array ty #

fromListN :: Int -> [Item (Array ty)] -> Array ty #

toList :: Array ty -> [Item (Array ty)] #

IsList c => IsList (NonEmpty c) Source # 
Instance details

Defined in Basement.NonEmpty

Associated Types

type Item (NonEmpty c) 
Instance details

Defined in Basement.NonEmpty

type Item (NonEmpty c) = Item c

Methods

fromList :: [Item (NonEmpty c)] -> NonEmpty c #

fromListN :: Int -> [Item (NonEmpty c)] -> NonEmpty c #

toList :: NonEmpty c -> [Item (NonEmpty c)] #

PrimType ty => IsList (UArray ty) Source # 
Instance details

Defined in Basement.UArray.Base

Associated Types

type Item (UArray ty) 
Instance details

Defined in Basement.UArray.Base

type Item (UArray ty) = ty

Methods

fromList :: [Item (UArray ty)] -> UArray ty #

fromListN :: Int -> [Item (UArray ty)] -> UArray ty #

toList :: UArray ty -> [Item (UArray ty)] #

IsList (NonEmpty a) 
Instance details

Defined in GHC.Internal.IsList

Associated Types

type Item (NonEmpty a) 
Instance details

Defined in GHC.Internal.IsList

type Item (NonEmpty a) = a

Methods

fromList :: [Item (NonEmpty a)] -> NonEmpty a #

fromListN :: Int -> [Item (NonEmpty a)] -> NonEmpty a #

toList :: NonEmpty a -> [Item (NonEmpty a)] #

IsList (ZipList a) 
Instance details

Defined in GHC.Internal.IsList

Associated Types

type Item (ZipList a) 
Instance details

Defined in GHC.Internal.IsList

type Item (ZipList a) = a

Methods

fromList :: [Item (ZipList a)] -> ZipList a #

fromListN :: Int -> [Item (ZipList a)] -> ZipList a #

toList :: ZipList a -> [Item (ZipList a)] #

IsList [a] 
Instance details

Defined in GHC.Internal.IsList

Associated Types

type Item [a] 
Instance details

Defined in GHC.Internal.IsList

type Item [a] = a

Methods

fromList :: [Item [a]] -> [a] #

fromListN :: Int -> [Item [a]] -> [a] #

toList :: [a] -> [Item [a]] #