streamly-core-0.2.2: Streaming, parsers, arrays, serialization and more
Copyright(c) 2019 Composewell Technologies
LicenseBSD-3-Clause
Maintainerstreamly@composewell.com
Stabilityexperimental
PortabilityGHC
Safe HaskellSafe-Inferred
LanguageHaskell2010

Streamly.Data.Array.Generic

Description

Unconstrained version of Streamly.Data.Array module.

See the Streamly.Data.Array module for documentation.

Synopsis

Documentation

data Array a Source #

Instances

Instances details
Read a => Read (Array a) Source # 
Instance details

Defined in Streamly.Internal.Data.Array.Generic

Show a => Show (Array a) Source # 
Instance details

Defined in Streamly.Internal.Data.Array.Generic

Methods

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

show :: Array a -> String #

showList :: [Array a] -> ShowS #

Eq a => Eq (Array a) Source # 
Instance details

Defined in Streamly.Internal.Data.Array.Generic

Methods

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

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

Ord a => Ord (Array a) Source # 
Instance details

Defined in Streamly.Internal.Data.Array.Generic

Methods

compare :: Array a -> Array a -> Ordering #

(<) :: Array a -> Array a -> Bool #

(<=) :: Array a -> Array a -> Bool #

(>) :: Array a -> Array a -> Bool #

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

max :: Array a -> Array a -> Array a #

min :: Array a -> Array a -> Array a #

Construction

fromListN :: Int -> [a] -> Array a Source #

fromList :: [a] -> Array a Source #

createOf :: MonadIO m => Int -> Fold m a (Array a) Source #

create :: MonadIO m => Fold m a (Array a) Source #

Fold the whole input to a single array.

Caution! Do not use this on infinite streams.

Conversion

toList :: Array a -> [a] Source #

Streams

read :: Monad m => Array a -> Stream m a Source #

readRev :: Monad m => Array a -> Stream m a Source #

Unfolds

reader :: Monad m => Unfold m (Array a) a Source #

Random Access

getIndex :: Int -> Array a -> Maybe a Source #

Lookup the element at the given index. Index starts from 0.

Deprecated

writeN :: MonadIO m => Int -> Fold m a (Array a) Source #

write :: MonadIO m => Fold m a (Array a) Source #