definitive-base-2.6.3: A small Prelude wrapper to simplify my own Haskell developments

Safe HaskellNone
LanguageHaskell2010

Data.Containers.Sequence

Contents

Synopsis

Documentation

class Monoid t => Sequence t where Source #

Minimal complete definition

splitAt

Methods

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

Instances

Sequence Bytes Source # 

Methods

splitAt :: Int -> Bytes -> (Bytes, Bytes) Source #

Sequence Chunk Source # 

Methods

splitAt :: Int -> Chunk -> (Chunk, Chunk) Source #

Sequence [a] Source # 

Methods

splitAt :: Int -> [a] -> ([a], [a]) Source #

Storable a => Sequence (Vector a) Source # 

Methods

splitAt :: Int -> Vector a -> (Vector a, Vector a) Source #

Storable a => Sequence (Slices a) Source # 

Methods

splitAt :: Int -> Slices a -> (Slices a, Slices a) Source #

class Stream c s | s -> c where Source #

Minimal complete definition

uncons, cons

Methods

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

cons :: c -> s -> s Source #

Instances

Stream Char Chunk Source # 
Stream Word8 Bytes Source # 
Stream a [a] Source # 

Methods

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

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

(Direction push, Direction pop) => Stream a (Queue push pop a) Source # 

Methods

uncons :: Queue push pop a -> Maybe (a, Queue push pop a) Source #

cons :: a -> Queue push pop a -> Queue push pop a Source #

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 #

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 #

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

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

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

Strict and lazy slices (bytestrings on arbitrary Storable types)

type Slice a = Vector a Source #

data Slices a Source #

Instances

Monoid (Slices a) Source # 

Methods

zero :: Slices a Source #

Semigroup (Slices a) Source # 

Methods

(+) :: Slices a -> Slices a -> Slices a Source #

Storable a => Sequence (Slices a) Source # 

Methods

splitAt :: Int -> Slices a -> (Slices a, Slices a) Source #

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

slices :: 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 #

_Slices :: Iso (Slices a) (Slices b) [Slice a] [Slice b] 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) => Fold a b (Slice a) (Slice b) Source #

Orphan instances

Storable a => Monoid (Vector a) Source # 

Methods

zero :: Vector a Source #

Storable a => Semigroup (Vector a) Source # 

Methods

(+) :: Vector a -> Vector a -> Vector a Source #

Storable a => DataMap (Slice a) Int a Source # 

Methods

at :: Int -> Lens' (Slice a) (Maybe a) Source #