definitive-base-2.3: The base modules of the Definitive framework.

Safe HaskellNone
LanguageHaskell2010

Data.Containers.Sequence

Contents

Synopsis

Documentation

class Monoid t => Sequence t where Source

Methods

splitAt :: Int -> t -> (t, t) Source

Instances

class Stream c s | s -> c where Source

Methods

uncons :: s -> Maybe (c, s) Source

cons :: c -> s -> s Source

Instances

Stream Char Chunk 
Stream a [a] 
(Direction push, Direction pop) => Stream a (Queue push pop a) 

i'elems :: (Monoid s', Stream c s, Stream c' s') => Iso [c] [c'] s s' Source

take :: Sequence t => Int -> t -> t Source

drop :: Sequence t => Int -> t -> t Source

Strict and lazy slices (bytestrings on arbitrary Storable types)

type Slice a = Vector a Source

data Slices a Source

Instances

slice :: (Storable a, Storable b) => Iso (Slice a) (Slice b) [a] [b] Source

slices :: (Storable a, Storable b) => Iso (Slices a) (Slices b) (Slice a) (Slice b) Source

i'storables :: forall a b. (Storable a, Storable b) => Iso (Slice a) (Slice b) Chunk Chunk Source

unsafeWith :: Storable a => Vector a -> (Ptr a -> IO b) -> IO b

Pass a pointer to the vector's data to the IO action. The data may not be modified through the 'Ptr.

sliceElt :: (Storable a, Storable b) => Action a b (Slice a) (Slice b) Source

span :: Stream c s => (c -> Bool) -> s -> ([c], s) Source

break :: Stream c s => (c -> Bool) -> s -> ([c], s) Source

takeWhile :: Stream c s => (c -> Bool) -> s -> [c] Source

takeUntil :: Stream c s => (c -> Bool) -> s -> [c] Source

dropWhile :: Stream c s => (c -> Bool) -> s -> s Source

dropUntil :: Stream c s => (c -> Bool) -> s -> s Source

pry :: Stream c s => Int -> s -> ([c], s) Source

(++) :: Stream c s => [c] -> s -> s Source