massiv-0.4.2.0: Massiv (Массив) is an Array Library.

Copyright(c) Alexey Kuleshevich 2019
LicenseBSD3
MaintainerAlexey Kuleshevich <lehins@yandex.ru>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Data.Massiv.Array.Manifest.Vector.Stream

Contents

Description

 
Synopsis

Documentation

Important - This module is still experimental, as such it is considered internal and exported for the curious users only.

data Steps m e Source #

Constructors

Steps 

Fields

Instances
Monad m => Functor (Steps m) Source # 
Instance details

Defined in Data.Massiv.Core.Common

Methods

fmap :: (a -> b) -> Steps m a -> Steps m b #

(<$) :: a -> Steps m b -> Steps m a #

class Stream r ix e where Source #

Methods

toStream :: Array r ix e -> Steps Id e Source #

Instances
Ragged L ix e => Stream L ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

toStream :: Array L ix e -> Steps Id e Source #

Stream LN Ix1 e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

toStream :: Array LN Ix1 e -> Steps Id e Source #

Index ix => Stream D ix e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

toStream :: Array D ix e -> Steps Id e Source #

Index ix => Stream M ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Internal

Methods

toStream :: Array M ix e -> Steps Id e Source #

(Index ix, Unbox e) => Stream U ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

toStream :: Array U ix e -> Steps Id e Source #

(Prim e, Index ix) => Stream P ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

toStream :: Array P ix e -> Steps Id e Source #

(Index ix, Storable e) => Stream S ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

toStream :: Array S ix e -> Steps Id e Source #

Stream DS Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Stream

Methods

toStream :: Array DS Ix1 e -> Steps Id e Source #

Index ix => Stream N ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

toStream :: Array N ix e -> Steps Id e Source #

Index ix => Stream B ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

toStream :: Array B ix e -> Steps Id e Source #

Conversion

steps :: forall r ix e m. (Monad m, Source r ix e) => Array r ix e -> Steps m e Source #

isteps :: forall r ix e m. (Monad m, Source r ix e) => Array r ix e -> Steps m (ix, e) Source #

fromStream :: forall r e. Mutable r Ix1 e => Size -> Stream Id e -> Array r Ix1 e Source #

fromStreamM :: forall r e m. (Monad m, Mutable r Ix1 e) => Size -> Stream m e -> m (Array r Ix1 e) Source #

fromStreamExactM :: forall r ix e m. (Monad m, Mutable r ix e) => Sz ix -> Stream m e -> m (Array r ix e) Source #

unstreamExact :: forall r ix e. Mutable r ix e => Sz ix -> Stream Id e -> Array r ix e Source #

unstreamMax :: forall r e. Mutable r Ix1 e => Int -> Stream Id e -> Array r Ix1 e Source #

unstreamMaxM :: (Mutable r ix a, PrimMonad m) => MArray (PrimState m) r ix a -> Stream Id a -> m Int Source #

unstreamIntoM :: (Mutable r Ix1 a, PrimMonad m) => MArray (PrimState m) r Ix1 a -> Size -> Stream Id a -> m (MArray (PrimState m) r Ix1 a) Source #

Bundle

toBundle :: (Monad m, Source r ix e) => Array r ix e -> Bundle m v e Source #

fromBundle :: Mutable r Ix1 e => Bundle Id v e -> Array r Ix1 e Source #

fromBundleM :: (Monad m, Mutable r Ix1 e) => Bundle m v e -> m (Array r Ix1 e) Source #

Operations on Steps

empty :: Monad m => Steps m e Source #

singleton :: Monad m => e -> Steps m e Source #

generate :: Monad m => Int -> (Int -> e) -> Steps m e Source #

cons :: Monad m => e -> Steps m e -> Steps m e Source #

uncons :: Monad m => Steps m e -> m (Maybe (e, Steps m e)) Source #

snoc :: Monad m => Steps m e -> e -> Steps m e Source #

drop :: Monad m => Int -> Steps m a -> Steps m a Source #

take :: Monad m => Int -> Steps m a -> Steps m a Source #

slice :: Monad m => Int -> Int -> Steps m a -> Steps m a Source #

traverse :: (Monad m, Applicative f) => (e -> f a) -> Steps Id e -> f (Steps m a) Source #

mapM :: Monad m => (e -> m a) -> Steps m e -> Steps m a Source #

concatMap :: Monad m => (a -> Steps m e) -> Steps m a -> Steps m e Source #

append :: Monad m => Steps m e -> Steps m e -> Steps m e Source #

zipWith :: Monad m => (a -> b -> e) -> Steps m a -> Steps m b -> Steps m e Source #

zipWithM :: Monad m => (a -> b -> m c) -> Steps m a -> Steps m b -> Steps m c Source #

Folding

foldl :: (b -> a -> b) -> b -> Steps Id a -> b Source #

foldr :: (a -> b -> b) -> b -> Steps Id a -> b Source #

foldlM :: Monad m => (a -> b -> m a) -> a -> Steps m b -> m a Source #

foldrM :: Monad m => (b -> a -> m a) -> a -> Steps m b -> m a Source #

Unfolding

unfoldr :: Monad m => (s -> Maybe (e, s)) -> s -> Steps m e Source #

unfoldrN :: Monad m => Sz1 -> (s -> Maybe (e, s)) -> s -> Steps m e Source #

Lists

toList :: Steps Id e -> [e] Source #

fromList :: Monad m => [e] -> Steps m e Source #

fromListN :: Monad m => Int -> [e] -> Steps m e Source #

Filter

mapMaybe :: Monad m => (a -> Maybe e) -> Steps m a -> Steps m e Source #

mapMaybeA :: (Monad m, Applicative f) => (a -> f (Maybe e)) -> Steps Id a -> f (Steps m e) Source #

mapMaybeM :: Monad m => (a -> m (Maybe b)) -> Steps m a -> Steps m b Source #

filter :: Monad m => (a -> Bool) -> Steps m a -> Steps m a Source #

filterA :: (Monad m, Applicative f) => (e -> f Bool) -> Steps Id e -> f (Steps m e) Source #

filterM :: Monad m => (e -> m Bool) -> Steps m e -> Steps m e Source #

Useful re-exports