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: 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.
IsList CallStack | Be aware that 'fromList . toList = id' only for unfrozen Since: 4.9.0.0 |
IsList Version | Since: 4.8.0.0 |
IsList AsciiString # | |
IsList String # | |
IsList [a] | |
IsList (NonEmpty a) | |
IsList c => IsList (NonEmpty c) # | |
PrimType ty => IsList (Block ty) # | |
PrimType ty => IsList (UArray ty) # | |
IsList (Array ty) # | |