License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
compat friendly version of IsList
Documentation
The IsList
class and its methods are intended to be used in
conjunction with the OverloadedLists extension.
Since: base-4.7.0.0
The fromList
function constructs the structure l
from the given
list of Item l
fromListN :: Int -> [Item l] -> l #
The fromListN
function takes the input list's length as a hint. Its
behaviour should be equivalent to fromList
. The hint can be used to
construct the structure l
more efficiently compared to fromList
. If
the given hint does not equal to the input list's length the behaviour of
fromListN
is not specified.
The toList
function extracts a list of Item l
from the structure l
.
It should satisfy fromList . toList = id.
Instances
IsList CallStack | Be aware that 'fromList . toList = id' only for unfrozen Since: base-4.9.0.0 |
IsList Version | Since: base-4.8.0.0 |
IsList AsciiString # | |
Defined in Basement.Types.AsciiString type Item AsciiString :: Type # fromList :: [Item AsciiString] -> AsciiString # fromListN :: Int -> [Item AsciiString] -> AsciiString # toList :: AsciiString -> [Item AsciiString] # | |
IsList String # | |
IsList [a] | Since: base-4.7.0.0 |
IsList (NonEmpty a) | Since: base-4.9.0.0 |
IsList c => IsList (NonEmpty c) # | |
PrimType ty => IsList (Block ty) # | |
PrimType ty => IsList (UArray ty) # | |
IsList (Array ty) # | |