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
fromList :: [ Item l] -> l Source #
The
fromList
function constructs the structure
l
from the given
list of
Item l
fromListN :: Int -> [ Item l] -> l Source #
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.
toList :: l -> [ Item l] Source #
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 Source # | |
Defined in Basement.Types.AsciiString type Item AsciiString Source # fromList :: [ Item AsciiString ] -> AsciiString Source # fromListN :: Int -> [ Item AsciiString ] -> AsciiString Source # toList :: AsciiString -> [ Item AsciiString ] Source # |
|
IsList String Source # | |
IsList [a] |
Since: base-4.7.0.0 |
IsList ( ZipList a) |
Since: base-4.15.0.0 |
IsList ( NonEmpty a) |
Since: base-4.9.0.0 |
IsList c => IsList ( NonEmpty c) Source # | |
PrimType ty => IsList ( Block ty) Source # | |
PrimType ty => IsList ( UArray ty) Source # | |
IsList ( Array ty) Source # | |