basement-0.0.15: Foundation scrap box of array & string
License BSD-style
Maintainer Vincent Hanquez <vincent@snarc.org>
Stability experimental
Portability portable
Safe Haskell None
Language Haskell2010

Basement.Compat.IsList

Description

compat friendly version of IsList

Synopsis

Documentation

class IsList l where Source #

The IsList class and its methods are intended to be used in conjunction with the OverloadedLists extension.

Since: base-4.7.0.0

Minimal complete definition

fromList , toList

Associated Types

type Item l Source #

The Item type function returns the type of items of the structure l .

Methods

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

Instances details
IsList CallStack

Be aware that 'fromList . toList = id' only for unfrozen CallStack s, since toList removes frozenness information.

Since: base-4.9.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item CallStack Source #

IsList Version

Since: base-4.8.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item Version Source #

IsList AsciiString Source #
Instance details

Defined in Basement.Types.AsciiString

IsList String Source #
Instance details

Defined in Basement.UTF8.Base

Associated Types

type Item String Source #

IsList [a]

Since: base-4.7.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item [a] Source #

IsList ( ZipList a)

Since: base-4.15.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item ( ZipList a) Source #

IsList ( NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item ( NonEmpty a) Source #

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

Defined in Basement.NonEmpty

Associated Types

type Item ( NonEmpty c) Source #

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

Defined in Basement.Block.Base

Associated Types

type Item ( Block ty) Source #

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

Defined in Basement.UArray.Base

Associated Types

type Item ( UArray ty) Source #

IsList ( Array ty) Source #
Instance details

Defined in Basement.BoxedArray

Associated Types

type Item ( Array ty) Source #