foundation-0.0.15: Alternative prelude with batteries and no dependencies

LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Foundation.Collection

Description

Different collections (list, vector, string, ..) unified under 1 API. an API to rules them all, and in the darkness bind them.

Synopsis

Documentation

class Zippable col => BoxedZippable col where #

Methods

zip :: (Sequential a, Sequential b, Element col ~ (Element a, Element b)) => a -> b -> col #

zip takes two collections and returns a collections of corresponding pairs. If one input collection is short, excess elements of the longer collection are discarded.

zip3 :: (Sequential a, Sequential b, Sequential c, Element col ~ (Element a, Element b, Element c)) => a -> b -> c -> col #

Like zip, but works with 3 collections.

zip4 :: (Sequential a, Sequential b, Sequential c, Sequential d, Element col ~ (Element a, Element b, Element c, Element d)) => a -> b -> c -> d -> col #

Like zip, but works with 4 collections.

zip5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Element col ~ (Element a, Element b, Element c, Element d, Element e)) => a -> b -> c -> d -> e -> col #

Like zip, but works with 5 collections.

zip6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Element col ~ (Element a, Element b, Element c, Element d, Element e, Element f)) => a -> b -> c -> d -> e -> f -> col #

Like zip, but works with 6 collections.

zip7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g, Element col ~ (Element a, Element b, Element c, Element d, Element e, Element f, Element g)) => a -> b -> c -> d -> e -> f -> g -> col #

Like zip, but works with 7 collections.

unzip :: (Sequential a, Sequential b, Element col ~ (Element a, Element b)) => col -> (a, b) #

unzip transforms a collection of pairs into a collection of first components and a collection of second components.

unzip3 :: (Sequential a, Sequential b, Sequential c, Element col ~ (Element a, Element b, Element c)) => col -> (a, b, c) #

Like unzip, but works on a collection of 3-element tuples.

unzip4 :: (Sequential a, Sequential b, Sequential c, Sequential d, Element col ~ (Element a, Element b, Element c, Element d)) => col -> (a, b, c, d) #

Like unzip, but works on a collection of 4-element tuples.

unzip5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Element col ~ (Element a, Element b, Element c, Element d, Element e)) => col -> (a, b, c, d, e) #

Like unzip, but works on a collection of 5-element tuples.

unzip6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Element col ~ (Element a, Element b, Element c, Element d, Element e, Element f)) => col -> (a, b, c, d, e, f) #

Like unzip, but works on a collection of 6-element tuples.

unzip7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g, Element col ~ (Element a, Element b, Element c, Element d, Element e, Element f, Element g)) => col -> (a, b, c, d, e, f, g) #

Like unzip, but works on a collection of 7-element tuples.

Instances

BoxedZippable [a] # 

Methods

zip :: (Sequential a, Sequential b, (* ~ Element [a]) (Element a, Element b)) => a -> b -> [a] #

zip3 :: (Sequential a, Sequential b, Sequential c, (* ~ Element [a]) (Element a, Element b, Element c)) => a -> b -> c -> [a] #

zip4 :: (Sequential a, Sequential b, Sequential c, Sequential d, (* ~ Element [a]) (Element a, Element b, Element c, Element d)) => a -> b -> c -> d -> [a] #

zip5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, (* ~ Element [a]) (Element a, Element b, Element c, Element d, Element e)) => a -> b -> c -> d -> e -> [a] #

zip6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, (* ~ Element [a]) (Element a, Element b, Element c, Element d, Element e, Element f)) => a -> b -> c -> d -> e -> f -> [a] #

zip7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g, (* ~ Element [a]) (Element a, Element b, Element c, Element d, Element e, Element f, Element g)) => a -> b -> c -> d -> e -> f -> g -> [a] #

unzip :: (Sequential a, Sequential b, (* ~ Element [a]) (Element a, Element b)) => [a] -> (a, b) #

unzip3 :: (Sequential a, Sequential b, Sequential c, (* ~ Element [a]) (Element a, Element b, Element c)) => [a] -> (a, b, c) #

unzip4 :: (Sequential a, Sequential b, Sequential c, Sequential d, (* ~ Element [a]) (Element a, Element b, Element c, Element d)) => [a] -> (a, b, c, d) #

unzip5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, (* ~ Element [a]) (Element a, Element b, Element c, Element d, Element e)) => [a] -> (a, b, c, d, e) #

unzip6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, (* ~ Element [a]) (Element a, Element b, Element c, Element d, Element e, Element f)) => [a] -> (a, b, c, d, e, f) #

unzip7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g, (* ~ Element [a]) (Element a, Element b, Element c, Element d, Element e, Element f, Element g)) => [a] -> (a, b, c, d, e, f, g) #

BoxedZippable (Array ty) # 

Methods

zip :: (Sequential a, Sequential b, (* ~ Element (Array ty)) (Element a, Element b)) => a -> b -> Array ty #

zip3 :: (Sequential a, Sequential b, Sequential c, (* ~ Element (Array ty)) (Element a, Element b, Element c)) => a -> b -> c -> Array ty #

zip4 :: (Sequential a, Sequential b, Sequential c, Sequential d, (* ~ Element (Array ty)) (Element a, Element b, Element c, Element d)) => a -> b -> c -> d -> Array ty #

zip5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, (* ~ Element (Array ty)) (Element a, Element b, Element c, Element d, Element e)) => a -> b -> c -> d -> e -> Array ty #

zip6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, (* ~ Element (Array ty)) (Element a, Element b, Element c, Element d, Element e, Element f)) => a -> b -> c -> d -> e -> f -> Array ty #

zip7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g, (* ~ Element (Array ty)) (Element a, Element b, Element c, Element d, Element e, Element f, Element g)) => a -> b -> c -> d -> e -> f -> g -> Array ty #

unzip :: (Sequential a, Sequential b, (* ~ Element (Array ty)) (Element a, Element b)) => Array ty -> (a, b) #

unzip3 :: (Sequential a, Sequential b, Sequential c, (* ~ Element (Array ty)) (Element a, Element b, Element c)) => Array ty -> (a, b, c) #

unzip4 :: (Sequential a, Sequential b, Sequential c, Sequential d, (* ~ Element (Array ty)) (Element a, Element b, Element c, Element d)) => Array ty -> (a, b, c, d) #

unzip5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, (* ~ Element (Array ty)) (Element a, Element b, Element c, Element d, Element e)) => Array ty -> (a, b, c, d, e) #

unzip6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, (* ~ Element (Array ty)) (Element a, Element b, Element c, Element d, Element e, Element f)) => Array ty -> (a, b, c, d, e, f) #

unzip7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g, (* ~ Element (Array ty)) (Element a, Element b, Element c, Element d, Element e, Element f, Element g)) => Array ty -> (a, b, c, d, e, f, g) #

type family Element container #

Element type of a collection

Instances

type Element String # 
type Element AsciiString # 
type Element Bitmap # 
type Element [a] # 
type Element [a] = a
type Element (Array ty) # 
type Element (Array ty) = ty
type Element (UArray ty) # 
type Element (UArray ty) = ty
type Element (Block ty) # 
type Element (Block ty) = ty
type Element (NonEmpty a) # 
type Element (NonEmpty a) = Element a
type Element (DList a) # 
type Element (DList a) = a
type Element (ChunkedUArray ty) # 
type Element (ChunkedUArray ty) = ty

class InnerFunctor c where #

A monomorphic functor that maps the inner values to values of the same type

Methods

imap :: (Element c -> Element c) -> c -> c #

imap :: (Functor f, Element (f a) ~ a, f a ~ c) => (Element c -> Element c) -> c -> c #

Instances

InnerFunctor String # 
InnerFunctor Bitmap # 
InnerFunctor [a] # 

Methods

imap :: (Element [a] -> Element [a]) -> [a] -> [a] #

InnerFunctor (Array ty) # 

Methods

imap :: (Element (Array ty) -> Element (Array ty)) -> Array ty -> Array ty #

PrimType ty => InnerFunctor (UArray ty) # 

Methods

imap :: (Element (UArray ty) -> Element (UArray ty)) -> UArray ty -> UArray ty #

class Foldable collection where #

Give the ability to fold a collection on itself

Minimal complete definition

foldl', foldr

Methods

foldl' :: (a -> Element collection -> a) -> a -> collection -> a #

Left-associative fold of a structure.

In the case of lists, foldl, when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right:

foldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xn

Note that to produce the outermost application of the operator the entire input list must be traversed. This means that foldl' will diverge if given an infinite list.

Note that Foundation only provides foldl', a strict version of foldl because the lazy version is seldom useful.

Left-associative fold of a structure with strict application of the operator.

foldr :: (Element collection -> a -> a) -> a -> collection -> a #

Right-associative fold of a structure.

foldr f z [x1, x2, ..., xn] == x1 `f` (x2 `f` ... (xn `f` z)...)

foldr' :: (Element collection -> a -> a) -> a -> collection -> a #

Right-associative fold of a structure, but with strict application of the operator.

Instances

Foldable Bitmap # 

Methods

foldl' :: (a -> Element Bitmap -> a) -> a -> Bitmap -> a #

foldr :: (Element Bitmap -> a -> a) -> a -> Bitmap -> a #

foldr' :: (Element Bitmap -> a -> a) -> a -> Bitmap -> a #

Foldable [a] # 

Methods

foldl' :: (a -> Element [a] -> a) -> a -> [a] -> a #

foldr :: (Element [a] -> a -> a) -> a -> [a] -> a #

foldr' :: (Element [a] -> a -> a) -> a -> [a] -> a #

Foldable (Array ty) # 

Methods

foldl' :: (a -> Element (Array ty) -> a) -> a -> Array ty -> a #

foldr :: (Element (Array ty) -> a -> a) -> a -> Array ty -> a #

foldr' :: (Element (Array ty) -> a -> a) -> a -> Array ty -> a #

PrimType ty => Foldable (UArray ty) # 

Methods

foldl' :: (a -> Element (UArray ty) -> a) -> a -> UArray ty -> a #

foldr :: (Element (UArray ty) -> a -> a) -> a -> UArray ty -> a #

foldr' :: (Element (UArray ty) -> a -> a) -> a -> UArray ty -> a #

PrimType ty => Foldable (Block ty) # 

Methods

foldl' :: (a -> Element (Block ty) -> a) -> a -> Block ty -> a #

foldr :: (Element (Block ty) -> a -> a) -> a -> Block ty -> a #

foldr' :: (Element (Block ty) -> a -> a) -> a -> Block ty -> a #

Foldable (DList a) # 

Methods

foldl' :: (a -> Element (DList a) -> a) -> a -> DList a -> a #

foldr :: (Element (DList a) -> a -> a) -> a -> DList a -> a #

foldr' :: (Element (DList a) -> a -> a) -> a -> DList a -> a #

PrimType ty => Foldable (ChunkedUArray ty) # 

Methods

foldl' :: (a -> Element (ChunkedUArray ty) -> a) -> a -> ChunkedUArray ty -> a #

foldr :: (Element (ChunkedUArray ty) -> a -> a) -> a -> ChunkedUArray ty -> a #

foldr' :: (Element (ChunkedUArray ty) -> a -> a) -> a -> ChunkedUArray ty -> a #

class Foldable f => Fold1able f where #

Fold1's. Like folds, but they assume to operate on a NonEmpty collection.

Minimal complete definition

foldl1', foldr1

Methods

foldl1' :: (Element f -> Element f -> Element f) -> NonEmpty f -> Element f #

Left associative strict fold.

foldr1 :: (Element f -> Element f -> Element f) -> NonEmpty f -> Element f #

Right associative lazy fold.

Instances

Fold1able [a] # 

Methods

foldl1' :: (Element [a] -> Element [a] -> Element [a]) -> NonEmpty [a] -> Element [a] #

foldr1 :: (Element [a] -> Element [a] -> Element [a]) -> NonEmpty [a] -> Element [a] #

Fold1able (Array ty) # 

Methods

foldl1' :: (Element (Array ty) -> Element (Array ty) -> Element (Array ty)) -> NonEmpty (Array ty) -> Element (Array ty) #

foldr1 :: (Element (Array ty) -> Element (Array ty) -> Element (Array ty)) -> NonEmpty (Array ty) -> Element (Array ty) #

PrimType ty => Fold1able (UArray ty) # 

Methods

foldl1' :: (Element (UArray ty) -> Element (UArray ty) -> Element (UArray ty)) -> NonEmpty (UArray ty) -> Element (UArray ty) #

foldr1 :: (Element (UArray ty) -> Element (UArray ty) -> Element (UArray ty)) -> NonEmpty (UArray ty) -> Element (UArray ty) #

PrimType ty => Fold1able (Block ty) # 

Methods

foldl1' :: (Element (Block ty) -> Element (Block ty) -> Element (Block ty)) -> NonEmpty (Block ty) -> Element (Block ty) #

foldr1 :: (Element (Block ty) -> Element (Block ty) -> Element (Block ty)) -> NonEmpty (Block ty) -> Element (Block ty) #

class Functor collection => Mappable collection where #

Functors representing data structures that can be traversed from left to right.

Mostly like base's Traversable but applied to collections only.

Minimal complete definition

traverse | sequenceA

Methods

traverse :: Applicative f => (a -> f b) -> collection a -> f (collection b) #

Map each element of a structure to an action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see traverse_.

sequenceA :: Applicative f => collection (f a) -> f (collection a) #

Evaluate each actions of the given collections, from left to right, and collect the results. For a version that ignores the results, see sequenceA_

mapM :: (Applicative m, Monad m) => (a -> m b) -> collection a -> m (collection b) #

Map each element of the collection to an action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see mapM_.

sequence :: (Applicative m, Monad m) => collection (m a) -> m (collection a) #

Evaluate each actions of the given collections, from left to right, and collect the results. For a version that ignores the results, see sequence_

Instances

Mappable [] # 

Methods

traverse :: Applicative f => (a -> f b) -> [a] -> f [b] #

sequenceA :: Applicative f => [f a] -> f [a] #

mapM :: (Applicative m, Monad m) => (a -> m b) -> [a] -> m [b] #

sequence :: (Applicative m, Monad m) => [m a] -> m [a] #

Mappable Array # 

Methods

traverse :: Applicative f => (a -> f b) -> Array a -> f (Array b) #

sequenceA :: Applicative f => Array (f a) -> f (Array a) #

mapM :: (Applicative m, Monad m) => (a -> m b) -> Array a -> m (Array b) #

sequence :: (Applicative m, Monad m) => Array (m a) -> m (Array a) #

traverse_ :: (Mappable col, Applicative f) => (a -> f b) -> col a -> f () #

Map each element of a collection to an action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see traverse

mapM_ :: (Mappable col, Applicative m, Monad m) => (a -> m b) -> col a -> m () #

Evaluate each action in the collection from left to right, and ignore the results. For a version that doesn't ignore the results see sequenceA. sequenceA_ :: (Mappable col, Applicative f) => col (f a) -> f () sequenceA_ col = sequenceA col *> pure ()

Map each element of a collection to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM.

forM :: (Mappable col, Applicative m, Monad m) => col a -> (a -> m b) -> m (col b) #

forM is mapM with its arguments flipped. For a version that ignores the results see forM_.

forM_ :: (Mappable col, Applicative m, Monad m) => col a -> (a -> m b) -> m () #

forM_ is mapM_ with its arguments flipped. For a version that doesn't ignore the results see forM.

class (IsList c, Item c ~ Element c) => Collection c where #

A set of methods for ordered colection

Minimal complete definition

null, length, (elem | notElem), minimum, maximum, all, any

Methods

null :: c -> Bool #

Check if a collection is empty

length :: c -> CountOf (Element c) #

Length of a collection (number of Element c)

elem :: forall a. (Eq a, a ~ Element c) => Element c -> c -> Bool #

Check if a collection contains a specific element

This is the inverse of notElem.

notElem :: forall a. (Eq a, a ~ Element c) => Element c -> c -> Bool #

Check if a collection does *not* contain a specific element

This is the inverse of elem.

maximum :: forall a. (Ord a, a ~ Element c) => NonEmpty c -> Element c #

Get the maximum element of a collection

minimum :: forall a. (Ord a, a ~ Element c) => NonEmpty c -> Element c #

Get the minimum element of a collection

any :: (Element c -> Bool) -> c -> Bool #

Determine is any elements of the collection satisfy the predicate

all :: (Element c -> Bool) -> c -> Bool #

Determine is all elements of the collection satisfy the predicate

Instances

Collection String # 
Collection AsciiString # 
Collection Bitmap # 
Collection [a] # 

Methods

null :: [a] -> Bool #

length :: [a] -> CountOf (Element [a]) #

elem :: (Eq a, (* ~ a) (Element [a])) => Element [a] -> [a] -> Bool #

notElem :: (Eq a, (* ~ a) (Element [a])) => Element [a] -> [a] -> Bool #

maximum :: (Ord a, (* ~ a) (Element [a])) => NonEmpty [a] -> Element [a] #

minimum :: (Ord a, (* ~ a) (Element [a])) => NonEmpty [a] -> Element [a] #

any :: (Element [a] -> Bool) -> [a] -> Bool #

all :: (Element [a] -> Bool) -> [a] -> Bool #

Collection (Array ty) # 

Methods

null :: Array ty -> Bool #

length :: Array ty -> CountOf (Element (Array ty)) #

elem :: (Eq a, (* ~ a) (Element (Array ty))) => Element (Array ty) -> Array ty -> Bool #

notElem :: (Eq a, (* ~ a) (Element (Array ty))) => Element (Array ty) -> Array ty -> Bool #

maximum :: (Ord a, (* ~ a) (Element (Array ty))) => NonEmpty (Array ty) -> Element (Array ty) #

minimum :: (Ord a, (* ~ a) (Element (Array ty))) => NonEmpty (Array ty) -> Element (Array ty) #

any :: (Element (Array ty) -> Bool) -> Array ty -> Bool #

all :: (Element (Array ty) -> Bool) -> Array ty -> Bool #

PrimType ty => Collection (UArray ty) # 

Methods

null :: UArray ty -> Bool #

length :: UArray ty -> CountOf (Element (UArray ty)) #

elem :: (Eq a, (* ~ a) (Element (UArray ty))) => Element (UArray ty) -> UArray ty -> Bool #

notElem :: (Eq a, (* ~ a) (Element (UArray ty))) => Element (UArray ty) -> UArray ty -> Bool #

maximum :: (Ord a, (* ~ a) (Element (UArray ty))) => NonEmpty (UArray ty) -> Element (UArray ty) #

minimum :: (Ord a, (* ~ a) (Element (UArray ty))) => NonEmpty (UArray ty) -> Element (UArray ty) #

any :: (Element (UArray ty) -> Bool) -> UArray ty -> Bool #

all :: (Element (UArray ty) -> Bool) -> UArray ty -> Bool #

PrimType ty => Collection (Block ty) # 

Methods

null :: Block ty -> Bool #

length :: Block ty -> CountOf (Element (Block ty)) #

elem :: (Eq a, (* ~ a) (Element (Block ty))) => Element (Block ty) -> Block ty -> Bool #

notElem :: (Eq a, (* ~ a) (Element (Block ty))) => Element (Block ty) -> Block ty -> Bool #

maximum :: (Ord a, (* ~ a) (Element (Block ty))) => NonEmpty (Block ty) -> Element (Block ty) #

minimum :: (Ord a, (* ~ a) (Element (Block ty))) => NonEmpty (Block ty) -> Element (Block ty) #

any :: (Element (Block ty) -> Bool) -> Block ty -> Bool #

all :: (Element (Block ty) -> Bool) -> Block ty -> Bool #

Collection c => Collection (NonEmpty c) # 

Methods

null :: NonEmpty c -> Bool #

length :: NonEmpty c -> CountOf (Element (NonEmpty c)) #

elem :: (Eq a, (* ~ a) (Element (NonEmpty c))) => Element (NonEmpty c) -> NonEmpty c -> Bool #

notElem :: (Eq a, (* ~ a) (Element (NonEmpty c))) => Element (NonEmpty c) -> NonEmpty c -> Bool #

maximum :: (Ord a, (* ~ a) (Element (NonEmpty c))) => NonEmpty (NonEmpty c) -> Element (NonEmpty c) #

minimum :: (Ord a, (* ~ a) (Element (NonEmpty c))) => NonEmpty (NonEmpty c) -> Element (NonEmpty c) #

any :: (Element (NonEmpty c) -> Bool) -> NonEmpty c -> Bool #

all :: (Element (NonEmpty c) -> Bool) -> NonEmpty c -> Bool #

Collection (DList a) # 

Methods

null :: DList a -> Bool #

length :: DList a -> CountOf (Element (DList a)) #

elem :: (Eq a, (* ~ a) (Element (DList a))) => Element (DList a) -> DList a -> Bool #

notElem :: (Eq a, (* ~ a) (Element (DList a))) => Element (DList a) -> DList a -> Bool #

maximum :: (Ord a, (* ~ a) (Element (DList a))) => NonEmpty (DList a) -> Element (DList a) #

minimum :: (Ord a, (* ~ a) (Element (DList a))) => NonEmpty (DList a) -> Element (DList a) #

any :: (Element (DList a) -> Bool) -> DList a -> Bool #

all :: (Element (DList a) -> Bool) -> DList a -> Bool #

PrimType ty => Collection (ChunkedUArray ty) # 

and :: (Collection col, Element col ~ Bool) => col -> Bool #

Return True if all the elements in the collection are True

or :: (Collection col, Element col ~ Bool) => col -> Bool #

Return True if at least one element in the collection is True

data NonEmpty a :: * -> * #

NonEmpty property for any Collection

Instances

IsList c => IsList (NonEmpty c) 

Associated Types

type Item (NonEmpty c) :: * #

Methods

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

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

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

Eq a => Eq (NonEmpty a) 

Methods

(==) :: NonEmpty a -> NonEmpty a -> Bool #

(/=) :: NonEmpty a -> NonEmpty a -> Bool #

Show a => Show (NonEmpty a) 

Methods

showsPrec :: Int -> NonEmpty a -> ShowS #

show :: NonEmpty a -> String #

showList :: [NonEmpty a] -> ShowS #

Collection c => Collection (NonEmpty c) # 

Methods

null :: NonEmpty c -> Bool #

length :: NonEmpty c -> CountOf (Element (NonEmpty c)) #

elem :: (Eq a, (* ~ a) (Element (NonEmpty c))) => Element (NonEmpty c) -> NonEmpty c -> Bool #

notElem :: (Eq a, (* ~ a) (Element (NonEmpty c))) => Element (NonEmpty c) -> NonEmpty c -> Bool #

maximum :: (Ord a, (* ~ a) (Element (NonEmpty c))) => NonEmpty (NonEmpty c) -> Element (NonEmpty c) #

minimum :: (Ord a, (* ~ a) (Element (NonEmpty c))) => NonEmpty (NonEmpty c) -> Element (NonEmpty c) #

any :: (Element (NonEmpty c) -> Bool) -> NonEmpty c -> Bool #

all :: (Element (NonEmpty c) -> Bool) -> NonEmpty c -> Bool #

type Item (NonEmpty c) 
type Item (NonEmpty c) = Item c
type Element (NonEmpty a) # 
type Element (NonEmpty a) = Element a

nonEmpty :: Collection c => c -> Maybe (NonEmpty c) #

Smart constructor to create a NonEmpty collection

If the collection is empty, then Nothing is returned Otherwise, the collection is wrapped in the NonEmpty property

nonEmpty_ :: Collection c => c -> NonEmpty c #

same as nonEmpty, but assume that the collection is non empty, and return an asynchronous error if it is.

nonEmptyFmap :: Functor f => (a -> b) -> NonEmpty (f a) -> NonEmpty (f b) #

class (IsList c, Item c ~ Element c, Monoid c, Collection c) => Sequential c where #

A set of methods for ordered colection

Methods

take :: CountOf (Element c) -> c -> c #

Take the first @n elements of a collection

revTake :: CountOf (Element c) -> c -> c #

Take the last @n elements of a collection

drop :: CountOf (Element c) -> c -> c #

Drop the first @n elements of a collection

revDrop :: CountOf (Element c) -> c -> c #

Drop the last @n elements of a collection

splitAt :: CountOf (Element c) -> c -> (c, c) #

Split the collection at the @n'th elements

revSplitAt :: CountOf (Element c) -> c -> (c, c) #

Split the collection at the @n'th elements from the end

splitOn :: (Element c -> Bool) -> c -> [c] #

Split on a specific elements returning a list of colletion

break :: (Element c -> Bool) -> c -> (c, c) #

Split a collection when the predicate return true

breakEnd :: (Element c -> Bool) -> c -> (c, c) #

Split a collection when the predicate return true

breakElem :: Eq (Element c) => Element c -> c -> (c, c) #

Split a collection when the predicate return true starting from the end of the collection

takeWhile :: (Element c -> Bool) -> c -> c #

Return the longest prefix in the collection that satisfy the predicate

dropWhile :: (Element c -> Bool) -> c -> c #

Return the longest prefix in the collection that satisfy the predicate

intersperse :: Element c -> c -> c #

The intersperse function takes an element and a list and `intersperses' that element between the elements of the list. For example,

intersperse ',' "abcde" == "a,b,c,d,e"

intercalate :: Monoid (Item c) => Element c -> c -> Element c #

intercalate xs xss is equivalent to (mconcat (intersperse xs xss)). It inserts the list xs in between the lists in xss and concatenates the result.

span :: (Element c -> Bool) -> c -> (c, c) #

Split a collection while the predicate return true

spanEnd :: (Element c -> Bool) -> c -> (c, c) #

Split a collection while the predicate return true starting from the end of the collection

filter :: (Element c -> Bool) -> c -> c #

Filter all the elements that satisfy the predicate

partition :: (Element c -> Bool) -> c -> (c, c) #

Partition the elements thtat satisfy the predicate and those that don't

reverse :: c -> c #

Reverse a collection

uncons :: c -> Maybe (Element c, c) #

Decompose a collection into its first element and the remaining collection. If the collection is empty, returns Nothing.

unsnoc :: c -> Maybe (c, Element c) #

Decompose a collection into a collection without its last element, and the last element If the collection is empty, returns Nothing.

snoc :: c -> Element c -> c #

Prepend an element to an ordered collection

cons :: Element c -> c -> c #

Append an element to an ordered collection

find :: (Element c -> Bool) -> c -> Maybe (Element c) #

Find an element in an ordered collection

sortBy :: (Element c -> Element c -> Ordering) -> c -> c #

Sort an ordered collection using the specified order function

singleton :: Element c -> c #

Create a collection with a single element

head :: NonEmpty c -> Element c #

get the first element of a non-empty collection

last :: NonEmpty c -> Element c #

get the last element of a non-empty collection

tail :: NonEmpty c -> c #

Extract the elements after the first element of a non-empty collection.

init :: NonEmpty c -> c #

Extract the elements before the last element of a non-empty collection.

replicate :: CountOf (Element c) -> Element c -> c #

Create a collection where the element in parameter is repeated N time

isPrefixOf :: Eq (Element c) => c -> c -> Bool #

Takes two collections and returns True iff the first collection is a prefix of the second.

isPrefixOf :: Eq c => c -> c -> Bool #

Takes two collections and returns True iff the first collection is a prefix of the second.

isSuffixOf :: Eq (Element c) => c -> c -> Bool #

Takes two collections and returns True iff the first collection is a suffix of the second.

isSuffixOf :: Eq c => c -> c -> Bool #

Takes two collections and returns True iff the first collection is a suffix of the second.

isInfixOf :: Eq (Element c) => c -> c -> Bool #

Takes two collections and returns True iff the first collection is an infix of the second.

isInfixOf :: Eq c => c -> c -> Bool #

Takes two collections and returns True iff the first collection is an infix of the second.

stripPrefix :: Eq (Element c) => c -> c -> Maybe c #

Try to strip a prefix from a collection

stripSuffix :: Eq (Element c) => c -> c -> Maybe c #

Try to strip a suffix from a collection

Instances

Sequential String # 

Methods

take :: CountOf (Element String) -> String -> String #

revTake :: CountOf (Element String) -> String -> String #

drop :: CountOf (Element String) -> String -> String #

revDrop :: CountOf (Element String) -> String -> String #

splitAt :: CountOf (Element String) -> String -> (String, String) #

revSplitAt :: CountOf (Element String) -> String -> (String, String) #

splitOn :: (Element String -> Bool) -> String -> [String] #

break :: (Element String -> Bool) -> String -> (String, String) #

breakEnd :: (Element String -> Bool) -> String -> (String, String) #

breakElem :: Element String -> String -> (String, String) #

takeWhile :: (Element String -> Bool) -> String -> String #

dropWhile :: (Element String -> Bool) -> String -> String #

intersperse :: Element String -> String -> String #

intercalate :: Element String -> String -> Element String #

span :: (Element String -> Bool) -> String -> (String, String) #

spanEnd :: (Element String -> Bool) -> String -> (String, String) #

filter :: (Element String -> Bool) -> String -> String #

partition :: (Element String -> Bool) -> String -> (String, String) #

reverse :: String -> String #

uncons :: String -> Maybe (Element String, String) #

unsnoc :: String -> Maybe (String, Element String) #

snoc :: String -> Element String -> String #

cons :: Element String -> String -> String #

find :: (Element String -> Bool) -> String -> Maybe (Element String) #

sortBy :: (Element String -> Element String -> Ordering) -> String -> String #

singleton :: Element String -> String #

head :: NonEmpty String -> Element String #

last :: NonEmpty String -> Element String #

tail :: NonEmpty String -> String #

init :: NonEmpty String -> String #

replicate :: CountOf (Element String) -> Element String -> String #

isPrefixOf :: String -> String -> Bool #

isSuffixOf :: String -> String -> Bool #

isInfixOf :: String -> String -> Bool #

stripPrefix :: String -> String -> Maybe String #

stripSuffix :: String -> String -> Maybe String #

Sequential AsciiString # 

Methods

take :: CountOf (Element AsciiString) -> AsciiString -> AsciiString #

revTake :: CountOf (Element AsciiString) -> AsciiString -> AsciiString #

drop :: CountOf (Element AsciiString) -> AsciiString -> AsciiString #

revDrop :: CountOf (Element AsciiString) -> AsciiString -> AsciiString #

splitAt :: CountOf (Element AsciiString) -> AsciiString -> (AsciiString, AsciiString) #

revSplitAt :: CountOf (Element AsciiString) -> AsciiString -> (AsciiString, AsciiString) #

splitOn :: (Element AsciiString -> Bool) -> AsciiString -> [AsciiString] #

break :: (Element AsciiString -> Bool) -> AsciiString -> (AsciiString, AsciiString) #

breakEnd :: (Element AsciiString -> Bool) -> AsciiString -> (AsciiString, AsciiString) #

breakElem :: Element AsciiString -> AsciiString -> (AsciiString, AsciiString) #

takeWhile :: (Element AsciiString -> Bool) -> AsciiString -> AsciiString #

dropWhile :: (Element AsciiString -> Bool) -> AsciiString -> AsciiString #

intersperse :: Element AsciiString -> AsciiString -> AsciiString #

intercalate :: Element AsciiString -> AsciiString -> Element AsciiString #

span :: (Element AsciiString -> Bool) -> AsciiString -> (AsciiString, AsciiString) #

spanEnd :: (Element AsciiString -> Bool) -> AsciiString -> (AsciiString, AsciiString) #

filter :: (Element AsciiString -> Bool) -> AsciiString -> AsciiString #

partition :: (Element AsciiString -> Bool) -> AsciiString -> (AsciiString, AsciiString) #

reverse :: AsciiString -> AsciiString #

uncons :: AsciiString -> Maybe (Element AsciiString, AsciiString) #

unsnoc :: AsciiString -> Maybe (AsciiString, Element AsciiString) #

snoc :: AsciiString -> Element AsciiString -> AsciiString #

cons :: Element AsciiString -> AsciiString -> AsciiString #

find :: (Element AsciiString -> Bool) -> AsciiString -> Maybe (Element AsciiString) #

sortBy :: (Element AsciiString -> Element AsciiString -> Ordering) -> AsciiString -> AsciiString #

singleton :: Element AsciiString -> AsciiString #

head :: NonEmpty AsciiString -> Element AsciiString #

last :: NonEmpty AsciiString -> Element AsciiString #

tail :: NonEmpty AsciiString -> AsciiString #

init :: NonEmpty AsciiString -> AsciiString #

replicate :: CountOf (Element AsciiString) -> Element AsciiString -> AsciiString #

isPrefixOf :: AsciiString -> AsciiString -> Bool #

isSuffixOf :: AsciiString -> AsciiString -> Bool #

isInfixOf :: AsciiString -> AsciiString -> Bool #

stripPrefix :: AsciiString -> AsciiString -> Maybe AsciiString #

stripSuffix :: AsciiString -> AsciiString -> Maybe AsciiString #

Sequential Bitmap # 

Methods

take :: CountOf (Element Bitmap) -> Bitmap -> Bitmap #

revTake :: CountOf (Element Bitmap) -> Bitmap -> Bitmap #

drop :: CountOf (Element Bitmap) -> Bitmap -> Bitmap #

revDrop :: CountOf (Element Bitmap) -> Bitmap -> Bitmap #

splitAt :: CountOf (Element Bitmap) -> Bitmap -> (Bitmap, Bitmap) #

revSplitAt :: CountOf (Element Bitmap) -> Bitmap -> (Bitmap, Bitmap) #

splitOn :: (Element Bitmap -> Bool) -> Bitmap -> [Bitmap] #

break :: (Element Bitmap -> Bool) -> Bitmap -> (Bitmap, Bitmap) #

breakEnd :: (Element Bitmap -> Bool) -> Bitmap -> (Bitmap, Bitmap) #

breakElem :: Element Bitmap -> Bitmap -> (Bitmap, Bitmap) #

takeWhile :: (Element Bitmap -> Bool) -> Bitmap -> Bitmap #

dropWhile :: (Element Bitmap -> Bool) -> Bitmap -> Bitmap #

intersperse :: Element Bitmap -> Bitmap -> Bitmap #

intercalate :: Element Bitmap -> Bitmap -> Element Bitmap #

span :: (Element Bitmap -> Bool) -> Bitmap -> (Bitmap, Bitmap) #

spanEnd :: (Element Bitmap -> Bool) -> Bitmap -> (Bitmap, Bitmap) #

filter :: (Element Bitmap -> Bool) -> Bitmap -> Bitmap #

partition :: (Element Bitmap -> Bool) -> Bitmap -> (Bitmap, Bitmap) #

reverse :: Bitmap -> Bitmap #

uncons :: Bitmap -> Maybe (Element Bitmap, Bitmap) #

unsnoc :: Bitmap -> Maybe (Bitmap, Element Bitmap) #

snoc :: Bitmap -> Element Bitmap -> Bitmap #

cons :: Element Bitmap -> Bitmap -> Bitmap #

find :: (Element Bitmap -> Bool) -> Bitmap -> Maybe (Element Bitmap) #

sortBy :: (Element Bitmap -> Element Bitmap -> Ordering) -> Bitmap -> Bitmap #

singleton :: Element Bitmap -> Bitmap #

head :: NonEmpty Bitmap -> Element Bitmap #

last :: NonEmpty Bitmap -> Element Bitmap #

tail :: NonEmpty Bitmap -> Bitmap #

init :: NonEmpty Bitmap -> Bitmap #

replicate :: CountOf (Element Bitmap) -> Element Bitmap -> Bitmap #

isPrefixOf :: Bitmap -> Bitmap -> Bool #

isSuffixOf :: Bitmap -> Bitmap -> Bool #

isInfixOf :: Bitmap -> Bitmap -> Bool #

stripPrefix :: Bitmap -> Bitmap -> Maybe Bitmap #

stripSuffix :: Bitmap -> Bitmap -> Maybe Bitmap #

Sequential [a] # 

Methods

take :: CountOf (Element [a]) -> [a] -> [a] #

revTake :: CountOf (Element [a]) -> [a] -> [a] #

drop :: CountOf (Element [a]) -> [a] -> [a] #

revDrop :: CountOf (Element [a]) -> [a] -> [a] #

splitAt :: CountOf (Element [a]) -> [a] -> ([a], [a]) #

revSplitAt :: CountOf (Element [a]) -> [a] -> ([a], [a]) #

splitOn :: (Element [a] -> Bool) -> [a] -> [[a]] #

break :: (Element [a] -> Bool) -> [a] -> ([a], [a]) #

breakEnd :: (Element [a] -> Bool) -> [a] -> ([a], [a]) #

breakElem :: Element [a] -> [a] -> ([a], [a]) #

takeWhile :: (Element [a] -> Bool) -> [a] -> [a] #

dropWhile :: (Element [a] -> Bool) -> [a] -> [a] #

intersperse :: Element [a] -> [a] -> [a] #

intercalate :: Element [a] -> [a] -> Element [a] #

span :: (Element [a] -> Bool) -> [a] -> ([a], [a]) #

spanEnd :: (Element [a] -> Bool) -> [a] -> ([a], [a]) #

filter :: (Element [a] -> Bool) -> [a] -> [a] #

partition :: (Element [a] -> Bool) -> [a] -> ([a], [a]) #

reverse :: [a] -> [a] #

uncons :: [a] -> Maybe (Element [a], [a]) #

unsnoc :: [a] -> Maybe ([a], Element [a]) #

snoc :: [a] -> Element [a] -> [a] #

cons :: Element [a] -> [a] -> [a] #

find :: (Element [a] -> Bool) -> [a] -> Maybe (Element [a]) #

sortBy :: (Element [a] -> Element [a] -> Ordering) -> [a] -> [a] #

singleton :: Element [a] -> [a] #

head :: NonEmpty [a] -> Element [a] #

last :: NonEmpty [a] -> Element [a] #

tail :: NonEmpty [a] -> [a] #

init :: NonEmpty [a] -> [a] #

replicate :: CountOf (Element [a]) -> Element [a] -> [a] #

isPrefixOf :: [a] -> [a] -> Bool #

isSuffixOf :: [a] -> [a] -> Bool #

isInfixOf :: [a] -> [a] -> Bool #

stripPrefix :: [a] -> [a] -> Maybe [a] #

stripSuffix :: [a] -> [a] -> Maybe [a] #

Sequential (Array ty) # 

Methods

take :: CountOf (Element (Array ty)) -> Array ty -> Array ty #

revTake :: CountOf (Element (Array ty)) -> Array ty -> Array ty #

drop :: CountOf (Element (Array ty)) -> Array ty -> Array ty #

revDrop :: CountOf (Element (Array ty)) -> Array ty -> Array ty #

splitAt :: CountOf (Element (Array ty)) -> Array ty -> (Array ty, Array ty) #

revSplitAt :: CountOf (Element (Array ty)) -> Array ty -> (Array ty, Array ty) #

splitOn :: (Element (Array ty) -> Bool) -> Array ty -> [Array ty] #

break :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) #

breakEnd :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) #

breakElem :: Element (Array ty) -> Array ty -> (Array ty, Array ty) #

takeWhile :: (Element (Array ty) -> Bool) -> Array ty -> Array ty #

dropWhile :: (Element (Array ty) -> Bool) -> Array ty -> Array ty #

intersperse :: Element (Array ty) -> Array ty -> Array ty #

intercalate :: Element (Array ty) -> Array ty -> Element (Array ty) #

span :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) #

spanEnd :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) #

filter :: (Element (Array ty) -> Bool) -> Array ty -> Array ty #

partition :: (Element (Array ty) -> Bool) -> Array ty -> (Array ty, Array ty) #

reverse :: Array ty -> Array ty #

uncons :: Array ty -> Maybe (Element (Array ty), Array ty) #

unsnoc :: Array ty -> Maybe (Array ty, Element (Array ty)) #

snoc :: Array ty -> Element (Array ty) -> Array ty #

cons :: Element (Array ty) -> Array ty -> Array ty #

find :: (Element (Array ty) -> Bool) -> Array ty -> Maybe (Element (Array ty)) #

sortBy :: (Element (Array ty) -> Element (Array ty) -> Ordering) -> Array ty -> Array ty #

singleton :: Element (Array ty) -> Array ty #

head :: NonEmpty (Array ty) -> Element (Array ty) #

last :: NonEmpty (Array ty) -> Element (Array ty) #

tail :: NonEmpty (Array ty) -> Array ty #

init :: NonEmpty (Array ty) -> Array ty #

replicate :: CountOf (Element (Array ty)) -> Element (Array ty) -> Array ty #

isPrefixOf :: Array ty -> Array ty -> Bool #

isSuffixOf :: Array ty -> Array ty -> Bool #

isInfixOf :: Array ty -> Array ty -> Bool #

stripPrefix :: Array ty -> Array ty -> Maybe (Array ty) #

stripSuffix :: Array ty -> Array ty -> Maybe (Array ty) #

PrimType ty => Sequential (UArray ty) # 

Methods

take :: CountOf (Element (UArray ty)) -> UArray ty -> UArray ty #

revTake :: CountOf (Element (UArray ty)) -> UArray ty -> UArray ty #

drop :: CountOf (Element (UArray ty)) -> UArray ty -> UArray ty #

revDrop :: CountOf (Element (UArray ty)) -> UArray ty -> UArray ty #

splitAt :: CountOf (Element (UArray ty)) -> UArray ty -> (UArray ty, UArray ty) #

revSplitAt :: CountOf (Element (UArray ty)) -> UArray ty -> (UArray ty, UArray ty) #

splitOn :: (Element (UArray ty) -> Bool) -> UArray ty -> [UArray ty] #

break :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) #

breakEnd :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) #

breakElem :: Element (UArray ty) -> UArray ty -> (UArray ty, UArray ty) #

takeWhile :: (Element (UArray ty) -> Bool) -> UArray ty -> UArray ty #

dropWhile :: (Element (UArray ty) -> Bool) -> UArray ty -> UArray ty #

intersperse :: Element (UArray ty) -> UArray ty -> UArray ty #

intercalate :: Element (UArray ty) -> UArray ty -> Element (UArray ty) #

span :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) #

spanEnd :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) #

filter :: (Element (UArray ty) -> Bool) -> UArray ty -> UArray ty #

partition :: (Element (UArray ty) -> Bool) -> UArray ty -> (UArray ty, UArray ty) #

reverse :: UArray ty -> UArray ty #

uncons :: UArray ty -> Maybe (Element (UArray ty), UArray ty) #

unsnoc :: UArray ty -> Maybe (UArray ty, Element (UArray ty)) #

snoc :: UArray ty -> Element (UArray ty) -> UArray ty #

cons :: Element (UArray ty) -> UArray ty -> UArray ty #

find :: (Element (UArray ty) -> Bool) -> UArray ty -> Maybe (Element (UArray ty)) #

sortBy :: (Element (UArray ty) -> Element (UArray ty) -> Ordering) -> UArray ty -> UArray ty #

singleton :: Element (UArray ty) -> UArray ty #

head :: NonEmpty (UArray ty) -> Element (UArray ty) #

last :: NonEmpty (UArray ty) -> Element (UArray ty) #

tail :: NonEmpty (UArray ty) -> UArray ty #

init :: NonEmpty (UArray ty) -> UArray ty #

replicate :: CountOf (Element (UArray ty)) -> Element (UArray ty) -> UArray ty #

isPrefixOf :: UArray ty -> UArray ty -> Bool #

isSuffixOf :: UArray ty -> UArray ty -> Bool #

isInfixOf :: UArray ty -> UArray ty -> Bool #

stripPrefix :: UArray ty -> UArray ty -> Maybe (UArray ty) #

stripSuffix :: UArray ty -> UArray ty -> Maybe (UArray ty) #

PrimType ty => Sequential (Block ty) # 

Methods

take :: CountOf (Element (Block ty)) -> Block ty -> Block ty #

revTake :: CountOf (Element (Block ty)) -> Block ty -> Block ty #

drop :: CountOf (Element (Block ty)) -> Block ty -> Block ty #

revDrop :: CountOf (Element (Block ty)) -> Block ty -> Block ty #

splitAt :: CountOf (Element (Block ty)) -> Block ty -> (Block ty, Block ty) #

revSplitAt :: CountOf (Element (Block ty)) -> Block ty -> (Block ty, Block ty) #

splitOn :: (Element (Block ty) -> Bool) -> Block ty -> [Block ty] #

break :: (Element (Block ty) -> Bool) -> Block ty -> (Block ty, Block ty) #

breakEnd :: (Element (Block ty) -> Bool) -> Block ty -> (Block ty, Block ty) #

breakElem :: Element (Block ty) -> Block ty -> (Block ty, Block ty) #

takeWhile :: (Element (Block ty) -> Bool) -> Block ty -> Block ty #

dropWhile :: (Element (Block ty) -> Bool) -> Block ty -> Block ty #

intersperse :: Element (Block ty) -> Block ty -> Block ty #

intercalate :: Element (Block ty) -> Block ty -> Element (Block ty) #

span :: (Element (Block ty) -> Bool) -> Block ty -> (Block ty, Block ty) #

spanEnd :: (Element (Block ty) -> Bool) -> Block ty -> (Block ty, Block ty) #

filter :: (Element (Block ty) -> Bool) -> Block ty -> Block ty #

partition :: (Element (Block ty) -> Bool) -> Block ty -> (Block ty, Block ty) #

reverse :: Block ty -> Block ty #

uncons :: Block ty -> Maybe (Element (Block ty), Block ty) #

unsnoc :: Block ty -> Maybe (Block ty, Element (Block ty)) #

snoc :: Block ty -> Element (Block ty) -> Block ty #

cons :: Element (Block ty) -> Block ty -> Block ty #

find :: (Element (Block ty) -> Bool) -> Block ty -> Maybe (Element (Block ty)) #

sortBy :: (Element (Block ty) -> Element (Block ty) -> Ordering) -> Block ty -> Block ty #

singleton :: Element (Block ty) -> Block ty #

head :: NonEmpty (Block ty) -> Element (Block ty) #

last :: NonEmpty (Block ty) -> Element (Block ty) #

tail :: NonEmpty (Block ty) -> Block ty #

init :: NonEmpty (Block ty) -> Block ty #

replicate :: CountOf (Element (Block ty)) -> Element (Block ty) -> Block ty #

isPrefixOf :: Block ty -> Block ty -> Bool #

isSuffixOf :: Block ty -> Block ty -> Bool #

isInfixOf :: Block ty -> Block ty -> Bool #

stripPrefix :: Block ty -> Block ty -> Maybe (Block ty) #

stripSuffix :: Block ty -> Block ty -> Maybe (Block ty) #

Sequential (DList a) # 

Methods

take :: CountOf (Element (DList a)) -> DList a -> DList a #

revTake :: CountOf (Element (DList a)) -> DList a -> DList a #

drop :: CountOf (Element (DList a)) -> DList a -> DList a #

revDrop :: CountOf (Element (DList a)) -> DList a -> DList a #

splitAt :: CountOf (Element (DList a)) -> DList a -> (DList a, DList a) #

revSplitAt :: CountOf (Element (DList a)) -> DList a -> (DList a, DList a) #

splitOn :: (Element (DList a) -> Bool) -> DList a -> [DList a] #

break :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) #

breakEnd :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) #

breakElem :: Element (DList a) -> DList a -> (DList a, DList a) #

takeWhile :: (Element (DList a) -> Bool) -> DList a -> DList a #

dropWhile :: (Element (DList a) -> Bool) -> DList a -> DList a #

intersperse :: Element (DList a) -> DList a -> DList a #

intercalate :: Element (DList a) -> DList a -> Element (DList a) #

span :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) #

spanEnd :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) #

filter :: (Element (DList a) -> Bool) -> DList a -> DList a #

partition :: (Element (DList a) -> Bool) -> DList a -> (DList a, DList a) #

reverse :: DList a -> DList a #

uncons :: DList a -> Maybe (Element (DList a), DList a) #

unsnoc :: DList a -> Maybe (DList a, Element (DList a)) #

snoc :: DList a -> Element (DList a) -> DList a #

cons :: Element (DList a) -> DList a -> DList a #

find :: (Element (DList a) -> Bool) -> DList a -> Maybe (Element (DList a)) #

sortBy :: (Element (DList a) -> Element (DList a) -> Ordering) -> DList a -> DList a #

singleton :: Element (DList a) -> DList a #

head :: NonEmpty (DList a) -> Element (DList a) #

last :: NonEmpty (DList a) -> Element (DList a) #

tail :: NonEmpty (DList a) -> DList a #

init :: NonEmpty (DList a) -> DList a #

replicate :: CountOf (Element (DList a)) -> Element (DList a) -> DList a #

isPrefixOf :: DList a -> DList a -> Bool #

isSuffixOf :: DList a -> DList a -> Bool #

isInfixOf :: DList a -> DList a -> Bool #

stripPrefix :: DList a -> DList a -> Maybe (DList a) #

stripSuffix :: DList a -> DList a -> Maybe (DList a) #

PrimType ty => Sequential (ChunkedUArray ty) # 

Methods

take :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> ChunkedUArray ty #

revTake :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> ChunkedUArray ty #

drop :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> ChunkedUArray ty #

revDrop :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> ChunkedUArray ty #

splitAt :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) #

revSplitAt :: CountOf (Element (ChunkedUArray ty)) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) #

splitOn :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> [ChunkedUArray ty] #

break :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) #

breakEnd :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) #

breakElem :: Element (ChunkedUArray ty) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) #

takeWhile :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> ChunkedUArray ty #

dropWhile :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> ChunkedUArray ty #

intersperse :: Element (ChunkedUArray ty) -> ChunkedUArray ty -> ChunkedUArray ty #

intercalate :: Element (ChunkedUArray ty) -> ChunkedUArray ty -> Element (ChunkedUArray ty) #

span :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) #

spanEnd :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) #

filter :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> ChunkedUArray ty #

partition :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> (ChunkedUArray ty, ChunkedUArray ty) #

reverse :: ChunkedUArray ty -> ChunkedUArray ty #

uncons :: ChunkedUArray ty -> Maybe (Element (ChunkedUArray ty), ChunkedUArray ty) #

unsnoc :: ChunkedUArray ty -> Maybe (ChunkedUArray ty, Element (ChunkedUArray ty)) #

snoc :: ChunkedUArray ty -> Element (ChunkedUArray ty) -> ChunkedUArray ty #

cons :: Element (ChunkedUArray ty) -> ChunkedUArray ty -> ChunkedUArray ty #

find :: (Element (ChunkedUArray ty) -> Bool) -> ChunkedUArray ty -> Maybe (Element (ChunkedUArray ty)) #

sortBy :: (Element (ChunkedUArray ty) -> Element (ChunkedUArray ty) -> Ordering) -> ChunkedUArray ty -> ChunkedUArray ty #

singleton :: Element (ChunkedUArray ty) -> ChunkedUArray ty #

head :: NonEmpty (ChunkedUArray ty) -> Element (ChunkedUArray ty) #

last :: NonEmpty (ChunkedUArray ty) -> Element (ChunkedUArray ty) #

tail :: NonEmpty (ChunkedUArray ty) -> ChunkedUArray ty #

init :: NonEmpty (ChunkedUArray ty) -> ChunkedUArray ty #

replicate :: CountOf (Element (ChunkedUArray ty)) -> Element (ChunkedUArray ty) -> ChunkedUArray ty #

isPrefixOf :: ChunkedUArray ty -> ChunkedUArray ty -> Bool #

isSuffixOf :: ChunkedUArray ty -> ChunkedUArray ty -> Bool #

isInfixOf :: ChunkedUArray ty -> ChunkedUArray ty -> Bool #

stripPrefix :: ChunkedUArray ty -> ChunkedUArray ty -> Maybe (ChunkedUArray ty) #

stripSuffix :: ChunkedUArray ty -> ChunkedUArray ty -> Maybe (ChunkedUArray ty) #

class MutableCollection c where #

Collection of things that can be made mutable, modified and then freezed into an MutableFreezed collection

Minimal complete definition

thaw, freeze, mutNew, mutWrite, mutRead, mutUnsafeWrite, mutUnsafeRead

Associated Types

type MutableFreezed c #

type MutableKey c #

type MutableValue c #

Methods

unsafeThaw :: PrimMonad prim => MutableFreezed c -> prim (c (PrimState prim)) #

unsafeFreeze :: PrimMonad prim => c (PrimState prim) -> prim (MutableFreezed c) #

thaw :: PrimMonad prim => MutableFreezed c -> prim (c (PrimState prim)) #

freeze :: PrimMonad prim => c (PrimState prim) -> prim (MutableFreezed c) #

mutNew :: PrimMonad prim => CountOf (MutableValue c) -> prim (c (PrimState prim)) #

mutUnsafeWrite :: PrimMonad prim => c (PrimState prim) -> MutableKey c -> MutableValue c -> prim () #

mutWrite :: PrimMonad prim => c (PrimState prim) -> MutableKey c -> MutableValue c -> prim () #

mutUnsafeRead :: PrimMonad prim => c (PrimState prim) -> MutableKey c -> prim (MutableValue c) #

mutRead :: PrimMonad prim => c (PrimState prim) -> MutableKey c -> prim (MutableValue c) #

Instances

MutableCollection MutableBitmap # 
MutableCollection (MArray ty) # 

Associated Types

type MutableFreezed (MArray ty :: * -> *) :: * #

type MutableKey (MArray ty :: * -> *) :: * #

type MutableValue (MArray ty :: * -> *) :: * #

Methods

unsafeThaw :: PrimMonad prim => MutableFreezed (MArray ty) -> prim (MArray ty (PrimState prim)) #

unsafeFreeze :: PrimMonad prim => MArray ty (PrimState prim) -> prim (MutableFreezed (MArray ty)) #

thaw :: PrimMonad prim => MutableFreezed (MArray ty) -> prim (MArray ty (PrimState prim)) #

freeze :: PrimMonad prim => MArray ty (PrimState prim) -> prim (MutableFreezed (MArray ty)) #

mutNew :: PrimMonad prim => CountOf (MutableValue (MArray ty)) -> prim (MArray ty (PrimState prim)) #

mutUnsafeWrite :: PrimMonad prim => MArray ty (PrimState prim) -> MutableKey (MArray ty) -> MutableValue (MArray ty) -> prim () #

mutWrite :: PrimMonad prim => MArray ty (PrimState prim) -> MutableKey (MArray ty) -> MutableValue (MArray ty) -> prim () #

mutUnsafeRead :: PrimMonad prim => MArray ty (PrimState prim) -> MutableKey (MArray ty) -> prim (MutableValue (MArray ty)) #

mutRead :: PrimMonad prim => MArray ty (PrimState prim) -> MutableKey (MArray ty) -> prim (MutableValue (MArray ty)) #

PrimType ty => MutableCollection (MUArray ty) # 

Associated Types

type MutableFreezed (MUArray ty :: * -> *) :: * #

type MutableKey (MUArray ty :: * -> *) :: * #

type MutableValue (MUArray ty :: * -> *) :: * #

Methods

unsafeThaw :: PrimMonad prim => MutableFreezed (MUArray ty) -> prim (MUArray ty (PrimState prim)) #

unsafeFreeze :: PrimMonad prim => MUArray ty (PrimState prim) -> prim (MutableFreezed (MUArray ty)) #

thaw :: PrimMonad prim => MutableFreezed (MUArray ty) -> prim (MUArray ty (PrimState prim)) #

freeze :: PrimMonad prim => MUArray ty (PrimState prim) -> prim (MutableFreezed (MUArray ty)) #

mutNew :: PrimMonad prim => CountOf (MutableValue (MUArray ty)) -> prim (MUArray ty (PrimState prim)) #

mutUnsafeWrite :: PrimMonad prim => MUArray ty (PrimState prim) -> MutableKey (MUArray ty) -> MutableValue (MUArray ty) -> prim () #

mutWrite :: PrimMonad prim => MUArray ty (PrimState prim) -> MutableKey (MUArray ty) -> MutableValue (MUArray ty) -> prim () #

mutUnsafeRead :: PrimMonad prim => MUArray ty (PrimState prim) -> MutableKey (MUArray ty) -> prim (MutableValue (MUArray ty)) #

mutRead :: PrimMonad prim => MUArray ty (PrimState prim) -> MutableKey (MUArray ty) -> prim (MutableValue (MUArray ty)) #

PrimType ty => MutableCollection (MutableBlock ty) # 

Associated Types

type MutableFreezed (MutableBlock ty :: * -> *) :: * #

type MutableKey (MutableBlock ty :: * -> *) :: * #

type MutableValue (MutableBlock ty :: * -> *) :: * #

class IndexedCollection c where #

Collection of elements that can indexed by int

Minimal complete definition

(!), findIndex

Methods

(!) :: c -> Offset (Element c) -> Maybe (Element c) #

findIndex :: (Element c -> Bool) -> c -> Maybe (Offset (Element c)) #

Instances

class KeyedCollection c where #

Collection of things that can be looked up by Key

Minimal complete definition

lookup

Associated Types

type Key c #

type Value c #

Methods

lookup :: Key c -> c -> Maybe (Value c) #

Instances

Eq k => KeyedCollection [(k, v)] # 

Associated Types

type Key [(k, v)] :: * #

type Value [(k, v)] :: * #

Methods

lookup :: Key [(k, v)] -> [(k, v)] -> Maybe (Value [(k, v)]) #

class Sequential col => Zippable col where #

Methods

zipWith :: (Sequential a, Sequential b) => (Element a -> Element b -> Element col) -> a -> b -> col #

zipWith generalises zip by zipping with the function given as the first argument, instead of a tupling function. For example, zipWith (+) is applied to two collections to produce the collection of corresponding sums.

zipWith3 :: (Sequential a, Sequential b, Sequential c) => (Element a -> Element b -> Element c -> Element col) -> a -> b -> c -> col #

Like zipWith, but works with 3 collections.

zipWith4 :: (Sequential a, Sequential b, Sequential c, Sequential d) => (Element a -> Element b -> Element c -> Element d -> Element col) -> a -> b -> c -> d -> col #

Like zipWith, but works with 4 collections.

zipWith5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element col) -> a -> b -> c -> d -> e -> col #

Like zipWith, but works with 5 collections.

zipWith6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element col) -> a -> b -> c -> d -> e -> f -> col #

Like zipWith, but works with 6 collections.

zipWith7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element g -> Element col) -> a -> b -> c -> d -> e -> f -> g -> col #

Like zipWith, but works with 7 collections.

Instances

Zippable String # 

Methods

zipWith :: (Sequential a, Sequential b) => (Element a -> Element b -> Element String) -> a -> b -> String #

zipWith3 :: (Sequential a, Sequential b, Sequential c) => (Element a -> Element b -> Element c -> Element String) -> a -> b -> c -> String #

zipWith4 :: (Sequential a, Sequential b, Sequential c, Sequential d) => (Element a -> Element b -> Element c -> Element d -> Element String) -> a -> b -> c -> d -> String #

zipWith5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element String) -> a -> b -> c -> d -> e -> String #

zipWith6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element String) -> a -> b -> c -> d -> e -> f -> String #

zipWith7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element g -> Element String) -> a -> b -> c -> d -> e -> f -> g -> String #

Zippable AsciiString # 

Methods

zipWith :: (Sequential a, Sequential b) => (Element a -> Element b -> Element AsciiString) -> a -> b -> AsciiString #

zipWith3 :: (Sequential a, Sequential b, Sequential c) => (Element a -> Element b -> Element c -> Element AsciiString) -> a -> b -> c -> AsciiString #

zipWith4 :: (Sequential a, Sequential b, Sequential c, Sequential d) => (Element a -> Element b -> Element c -> Element d -> Element AsciiString) -> a -> b -> c -> d -> AsciiString #

zipWith5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element AsciiString) -> a -> b -> c -> d -> e -> AsciiString #

zipWith6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element AsciiString) -> a -> b -> c -> d -> e -> f -> AsciiString #

zipWith7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element g -> Element AsciiString) -> a -> b -> c -> d -> e -> f -> g -> AsciiString #

Zippable [c] # 

Methods

zipWith :: (Sequential a, Sequential b) => (Element a -> Element b -> Element [c]) -> a -> b -> [c] #

zipWith3 :: (Sequential a, Sequential b, Sequential c) => (Element a -> Element b -> Element c -> Element [c]) -> a -> b -> c -> [c] #

zipWith4 :: (Sequential a, Sequential b, Sequential c, Sequential d) => (Element a -> Element b -> Element c -> Element d -> Element [c]) -> a -> b -> c -> d -> [c] #

zipWith5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element [c]) -> a -> b -> c -> d -> e -> [c] #

zipWith6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element [c]) -> a -> b -> c -> d -> e -> f -> [c] #

zipWith7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element g -> Element [c]) -> a -> b -> c -> d -> e -> f -> g -> [c] #

Zippable (Array ty) # 

Methods

zipWith :: (Sequential a, Sequential b) => (Element a -> Element b -> Element (Array ty)) -> a -> b -> Array ty #

zipWith3 :: (Sequential a, Sequential b, Sequential c) => (Element a -> Element b -> Element c -> Element (Array ty)) -> a -> b -> c -> Array ty #

zipWith4 :: (Sequential a, Sequential b, Sequential c, Sequential d) => (Element a -> Element b -> Element c -> Element d -> Element (Array ty)) -> a -> b -> c -> d -> Array ty #

zipWith5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element (Array ty)) -> a -> b -> c -> d -> e -> Array ty #

zipWith6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element (Array ty)) -> a -> b -> c -> d -> e -> f -> Array ty #

zipWith7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element g -> Element (Array ty)) -> a -> b -> c -> d -> e -> f -> g -> Array ty #

PrimType ty => Zippable (UArray ty) # 

Methods

zipWith :: (Sequential a, Sequential b) => (Element a -> Element b -> Element (UArray ty)) -> a -> b -> UArray ty #

zipWith3 :: (Sequential a, Sequential b, Sequential c) => (Element a -> Element b -> Element c -> Element (UArray ty)) -> a -> b -> c -> UArray ty #

zipWith4 :: (Sequential a, Sequential b, Sequential c, Sequential d) => (Element a -> Element b -> Element c -> Element d -> Element (UArray ty)) -> a -> b -> c -> d -> UArray ty #

zipWith5 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element (UArray ty)) -> a -> b -> c -> d -> e -> UArray ty #

zipWith6 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element (UArray ty)) -> a -> b -> c -> d -> e -> f -> UArray ty #

zipWith7 :: (Sequential a, Sequential b, Sequential c, Sequential d, Sequential e, Sequential f, Sequential g) => (Element a -> Element b -> Element c -> Element d -> Element e -> Element f -> Element g -> Element (UArray ty)) -> a -> b -> c -> d -> e -> f -> g -> UArray ty #

class Buildable col where #

Collections that can be built chunk by chunk.

Use the Monad instance of Builder to chain append operations and feed it into build:

>>> runST $ build 32 (append 'a' >> append 'b' >> append 'c') :: UArray Char
"abc"

Minimal complete definition

append, build

Associated Types

type Mutable col :: * -> * #

Mutable collection type used for incrementally writing chunks.

type Step col #

Unit of the smallest step possible in an append operation.

A UTF-8 character can have a size between 1 and 4 bytes, so this should be defined as 1 byte for collections of Char.

Methods

append :: PrimMonad prim => Element col -> Builder col (Mutable col) (Step col) prim err () #

build :: PrimMonad prim => Int -> Builder col (Mutable col) (Step col) prim err () -> prim (Either err col) #

Instances

Buildable String # 

Associated Types

type Mutable String :: * -> * #

type Step String :: * #

Methods

append :: PrimMonad prim => Element String -> Builder String (Mutable String) (Step String) prim err () #

build :: PrimMonad prim => Int -> Builder String (Mutable String) (Step String) prim err () -> prim (Either err String) #

Buildable (Array ty) # 

Associated Types

type Mutable (Array ty) :: * -> * #

type Step (Array ty) :: * #

Methods

append :: PrimMonad prim => Element (Array ty) -> Builder (Array ty) (Mutable (Array ty)) (Step (Array ty)) prim err () #

build :: PrimMonad prim => Int -> Builder (Array ty) (Mutable (Array ty)) (Step (Array ty)) prim err () -> prim (Either err (Array ty)) #

PrimType ty => Buildable (UArray ty) # 

Associated Types

type Mutable (UArray ty) :: * -> * #

type Step (UArray ty) :: * #

Methods

append :: PrimMonad prim => Element (UArray ty) -> Builder (UArray ty) (Mutable (UArray ty)) (Step (UArray ty)) prim err () #

build :: PrimMonad prim => Int -> Builder (UArray ty) (Mutable (UArray ty)) (Step (UArray ty)) prim err () -> prim (Either err (UArray ty)) #

build_ #

Arguments

:: (Buildable c, PrimMonad prim) 
=> Int

CountOf of a chunk

-> Builder c (Mutable c) (Step c) prim () () 
-> prim c 

newtype Builder collection mutCollection step state err a :: * -> (* -> *) -> * -> (* -> *) -> * -> * -> * #

Constructors

Builder 

Fields

Instances

Monad state => Monad (Builder collection mutCollection step state err) 

Methods

(>>=) :: Builder collection mutCollection step state err a -> (a -> Builder collection mutCollection step state err b) -> Builder collection mutCollection step state err b #

(>>) :: Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b -> Builder collection mutCollection step state err b #

return :: a -> Builder collection mutCollection step state err a #

fail :: String -> Builder collection mutCollection step state err a #

Monad state => Functor (Builder collection mutCollection step state err) 

Methods

fmap :: (a -> b) -> Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b #

(<$) :: a -> Builder collection mutCollection step state err b -> Builder collection mutCollection step state err a #

Monad state => Applicative (Builder collection mutCollection step state err) 

Methods

pure :: a -> Builder collection mutCollection step state err a #

(<*>) :: Builder collection mutCollection step state err (a -> b) -> Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b #

(*>) :: Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b -> Builder collection mutCollection step state err b #

(<*) :: Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b -> Builder collection mutCollection step state err a #

Monad state => MonadFailure (Builder collection mutCollection step state err) 

Associated Types

type Failure (Builder collection mutCollection step state err :: * -> *) :: * #

Methods

mFail :: Failure (Builder collection mutCollection step state err) -> Builder collection mutCollection step state err () #

type Failure (Builder collection mutCollection step state err) 
type Failure (Builder collection mutCollection step state err) = err

data BuildingState collection mutCollection step state :: * -> (* -> *) -> * -> * -> * #

The in-progress state of a building operation.

The previous buffers are in reverse order, and this contains the current buffer and the state of progress packing the elements inside.

Constructors

BuildingState 

Fields

class Copy a where #

Minimal complete definition

copy

Methods

copy :: a -> a #

Instances

Copy String # 

Methods

copy :: String -> String #

Copy [ty] # 

Methods

copy :: [ty] -> [ty] #

Copy (Array ty) # 

Methods

copy :: Array ty -> Array ty #

PrimType ty => Copy (UArray ty) # 

Methods

copy :: UArray ty -> UArray ty #

PrimType ty => Copy (Block ty) # 

Methods

copy :: Block ty -> Block ty #