Copyright | (c) Alexey Kuleshevich 2019 |
---|---|
License | BSD3 |
Maintainer | Alexey Kuleshevich <lehins@yandex.ru> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data Steps m e = Steps {
- stepsStream :: Stream m e
- stepsSize :: Size
- class Stream r ix e where
- steps :: forall r ix e m. (Monad m, Source r ix e) => Array r ix e -> Steps m e
- isteps :: forall r ix e m. (Monad m, Source r ix e) => Array r ix e -> Steps m (ix, e)
- fromStream :: forall r e. Mutable r Ix1 e => Size -> Stream Id e -> Array r Ix1 e
- fromStreamM :: forall r e m. (Monad m, Mutable r Ix1 e) => Size -> Stream m e -> m (Array r Ix1 e)
- fromStreamExactM :: forall r ix e m. (Monad m, Mutable r ix e) => Sz ix -> Stream m e -> m (Array r ix e)
- unstreamExact :: forall r ix e. Mutable r ix e => Sz ix -> Stream Id e -> Array r ix e
- unstreamMax :: forall r e. Mutable r Ix1 e => Int -> Stream Id e -> Array r Ix1 e
- unstreamMaxM :: (Mutable r ix a, PrimMonad m) => MArray (PrimState m) r ix a -> Stream Id a -> m Int
- unstreamUnknown :: Mutable r Ix1 a => Stream Id a -> Array r Ix1 a
- unstreamUnknownM :: (Mutable r Ix1 a, PrimMonad m) => MArray (PrimState m) r Ix1 a -> Stream Id a -> m (MArray (PrimState m) r Ix1 a)
- unstreamIntoM :: (Mutable r Ix1 a, PrimMonad m) => MArray (PrimState m) r Ix1 a -> Size -> Stream Id a -> m (MArray (PrimState m) r Ix1 a)
- toBundle :: (Monad m, Source r ix e) => Array r ix e -> Bundle m v e
- fromBundle :: Mutable r Ix1 e => Bundle Id v e -> Array r Ix1 e
- fromBundleM :: (Monad m, Mutable r Ix1 e) => Bundle m v e -> m (Array r Ix1 e)
- length :: Steps Id a -> Int
- empty :: Monad m => Steps m e
- singleton :: Monad m => e -> Steps m e
- generate :: Monad m => Int -> (Int -> e) -> Steps m e
- cons :: Monad m => e -> Steps m e -> Steps m e
- uncons :: Monad m => Steps m e -> m (Maybe (e, Steps m e))
- snoc :: Monad m => Steps m e -> e -> Steps m e
- drop :: Monad m => Int -> Steps m a -> Steps m a
- take :: Monad m => Int -> Steps m a -> Steps m a
- slice :: Monad m => Int -> Int -> Steps m a -> Steps m a
- traverse :: (Monad m, Applicative f) => (e -> f a) -> Steps Id e -> f (Steps m a)
- mapM :: Monad m => (e -> m a) -> Steps m e -> Steps m a
- concatMap :: Monad m => (a -> Steps m e) -> Steps m a -> Steps m e
- append :: Monad m => Steps m e -> Steps m e -> Steps m e
- zipWith :: Monad m => (a -> b -> e) -> Steps m a -> Steps m b -> Steps m e
- zipWithM :: Monad m => (a -> b -> m c) -> Steps m a -> Steps m b -> Steps m c
- foldl :: (b -> a -> b) -> b -> Steps Id a -> b
- foldr :: (a -> b -> b) -> b -> Steps Id a -> b
- foldlM :: Monad m => (a -> b -> m a) -> a -> Steps m b -> m a
- foldrM :: Monad m => (b -> a -> m a) -> a -> Steps m b -> m a
- unfoldr :: Monad m => (s -> Maybe (e, s)) -> s -> Steps m e
- unfoldrN :: Monad m => Sz1 -> (s -> Maybe (e, s)) -> s -> Steps m e
- toList :: Steps Id e -> [e]
- fromList :: Monad m => [e] -> Steps m e
- fromListN :: Monad m => Int -> [e] -> Steps m e
- mapMaybe :: Monad m => (a -> Maybe e) -> Steps m a -> Steps m e
- mapMaybeA :: (Monad m, Applicative f) => (a -> f (Maybe e)) -> Steps Id a -> f (Steps m e)
- mapMaybeM :: Monad m => (a -> m (Maybe b)) -> Steps m a -> Steps m b
- filter :: Monad m => (a -> Bool) -> Steps m a -> Steps m a
- filterA :: (Monad m, Applicative f) => (e -> f Bool) -> Steps Id e -> f (Steps m e)
- filterM :: Monad m => (e -> m Bool) -> Steps m e -> Steps m e
- transStepsId :: Monad m => Steps Id e -> Steps m e
- module Data.Vector.Fusion.Bundle.Size
- module Data.Vector.Fusion.Util
Documentation
Important - This module is still experimental, as such it is considered internal and exported for the curious users only.
Steps | |
|
class Stream r ix e where Source #
Instances
Ragged L ix e => Stream L ix e Source # | |
Stream LN Ix1 e Source # | |
Index ix => Stream D ix e Source # | |
Index ix => Stream M ix e Source # | |
(Index ix, Unbox e) => Stream U ix e Source # | |
(Prim e, Index ix) => Stream P ix e Source # | |
(Index ix, Storable e) => Stream S ix e Source # | |
Stream DS Ix1 e Source # | |
Index ix => Stream N ix e Source # | |
Index ix => Stream B ix e Source # | |
Conversion
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 #
unstreamMaxM :: (Mutable r ix a, PrimMonad m) => MArray (PrimState m) r ix a -> Stream Id a -> m Int Source #
unstreamUnknownM :: (Mutable r Ix1 a, PrimMonad m) => MArray (PrimState m) r Ix1 a -> Stream Id a -> m (MArray (PrimState m) r Ix1 a) 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
Operations on Steps
Folding
Unfolding
Lists
Filter
Useful re-exports
module Data.Vector.Fusion.Util