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

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

Data.Massiv.Core

Contents

Description

 
Synopsis

Documentation

data family Array r ix e :: * Source #

The array family. Representations r describes how data is arranged or computed. All arrays have a common property that each index ix always maps to the same unique element, even if that element does not exist in memory and has to be computed upon lookup. Data is always arranged in a nested fashion, depth of which is controlled by Rank ix.

Instances
Monad (Array DS Ix1) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Stream

Methods

(>>=) :: Array DS Ix1 a -> (a -> Array DS Ix1 b) -> Array DS Ix1 b #

(>>) :: Array DS Ix1 a -> Array DS Ix1 b -> Array DS Ix1 b #

return :: a -> Array DS Ix1 a #

fail :: String -> Array DS Ix1 a #

Functor (Array DL ix) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Push

Methods

fmap :: (a -> b) -> Array DL ix a -> Array DL ix b #

(<$) :: a -> Array DL ix b -> Array DL ix a #

Functor (Array D ix) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

fmap :: (a -> b) -> Array D ix a -> Array D ix b #

(<$) :: a -> Array D ix b -> Array D ix a #

Functor (Array DS Ix1) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Stream

Methods

fmap :: (a -> b) -> Array DS Ix1 a -> Array DS Ix1 b #

(<$) :: a -> Array DS Ix1 b -> Array DS Ix1 a #

Index ix => Functor (Array B ix) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

fmap :: (a -> b) -> Array B ix a -> Array B ix b #

(<$) :: a -> Array B ix b -> Array B ix a #

Functor (Array DW ix) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

fmap :: (a -> b) -> Array DW ix a -> Array DW ix b #

(<$) :: a -> Array DW ix b -> Array DW ix a #

Functor (Array DI ix) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Interleaved

Methods

fmap :: (a -> b) -> Array DI ix a -> Array DI ix b #

(<$) :: a -> Array DI ix b -> Array DI ix a #

Index ix => Applicative (Array D ix) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

pure :: a -> Array D ix a #

(<*>) :: Array D ix (a -> b) -> Array D ix a -> Array D ix b #

liftA2 :: (a -> b -> c) -> Array D ix a -> Array D ix b -> Array D ix c #

(*>) :: Array D ix a -> Array D ix b -> Array D ix b #

(<*) :: Array D ix a -> Array D ix b -> Array D ix a #

Applicative (Array DS Ix1) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Stream

Methods

pure :: a -> Array DS Ix1 a #

(<*>) :: Array DS Ix1 (a -> b) -> Array DS Ix1 a -> Array DS Ix1 b #

liftA2 :: (a -> b -> c) -> Array DS Ix1 a -> Array DS Ix1 b -> Array DS Ix1 c #

(*>) :: Array DS Ix1 a -> Array DS Ix1 b -> Array DS Ix1 b #

(<*) :: Array DS Ix1 a -> Array DS Ix1 b -> Array DS Ix1 a #

Index ix => Applicative (Array DI ix) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Interleaved

Methods

pure :: a -> Array DI ix a #

(<*>) :: Array DI ix (a -> b) -> Array DI ix a -> Array DI ix b #

liftA2 :: (a -> b -> c) -> Array DI ix a -> Array DI ix b -> Array DI ix c #

(*>) :: Array DI ix a -> Array DI ix b -> Array DI ix b #

(<*) :: Array DI ix a -> Array DI ix b -> Array DI ix a #

Index ix => Foldable (Array D ix) Source #

Row-major sequential folding over a Delayed array.

Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

fold :: Monoid m => Array D ix m -> m #

foldMap :: Monoid m => (a -> m) -> Array D ix a -> m #

foldr :: (a -> b -> b) -> b -> Array D ix a -> b #

foldr' :: (a -> b -> b) -> b -> Array D ix a -> b #

foldl :: (b -> a -> b) -> b -> Array D ix a -> b #

foldl' :: (b -> a -> b) -> b -> Array D ix a -> b #

foldr1 :: (a -> a -> a) -> Array D ix a -> a #

foldl1 :: (a -> a -> a) -> Array D ix a -> a #

toList :: Array D ix a -> [a] #

null :: Array D ix a -> Bool #

length :: Array D ix a -> Int #

elem :: Eq a => a -> Array D ix a -> Bool #

maximum :: Ord a => Array D ix a -> a #

minimum :: Ord a => Array D ix a -> a #

sum :: Num a => Array D ix a -> a #

product :: Num a => Array D ix a -> a #

Index ix => Foldable (Array M ix) Source #

Row-major sequentia folding over a Manifest array.

Instance details

Defined in Data.Massiv.Array.Manifest.Internal

Methods

fold :: Monoid m => Array M ix m -> m #

foldMap :: Monoid m => (a -> m) -> Array M ix a -> m #

foldr :: (a -> b -> b) -> b -> Array M ix a -> b #

foldr' :: (a -> b -> b) -> b -> Array M ix a -> b #

foldl :: (b -> a -> b) -> b -> Array M ix a -> b #

foldl' :: (b -> a -> b) -> b -> Array M ix a -> b #

foldr1 :: (a -> a -> a) -> Array M ix a -> a #

foldl1 :: (a -> a -> a) -> Array M ix a -> a #

toList :: Array M ix a -> [a] #

null :: Array M ix a -> Bool #

length :: Array M ix a -> Int #

elem :: Eq a => a -> Array M ix a -> Bool #

maximum :: Ord a => Array M ix a -> a #

minimum :: Ord a => Array M ix a -> a #

sum :: Num a => Array M ix a -> a #

product :: Num a => Array M ix a -> a #

Foldable (Array DS Ix1) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Stream

Methods

fold :: Monoid m => Array DS Ix1 m -> m #

foldMap :: Monoid m => (a -> m) -> Array DS Ix1 a -> m #

foldr :: (a -> b -> b) -> b -> Array DS Ix1 a -> b #

foldr' :: (a -> b -> b) -> b -> Array DS Ix1 a -> b #

foldl :: (b -> a -> b) -> b -> Array DS Ix1 a -> b #

foldl' :: (b -> a -> b) -> b -> Array DS Ix1 a -> b #

foldr1 :: (a -> a -> a) -> Array DS Ix1 a -> a #

foldl1 :: (a -> a -> a) -> Array DS Ix1 a -> a #

toList :: Array DS Ix1 a -> [a] #

null :: Array DS Ix1 a -> Bool #

length :: Array DS Ix1 a -> Int #

elem :: Eq a => a -> Array DS Ix1 a -> Bool #

maximum :: Ord a => Array DS Ix1 a -> a #

minimum :: Ord a => Array DS Ix1 a -> a #

sum :: Num a => Array DS Ix1 a -> a #

product :: Num a => Array DS Ix1 a -> a #

Index ix => Foldable (Array B ix) Source #

Row-major sequential folding over a Boxed array.

Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

fold :: Monoid m => Array B ix m -> m #

foldMap :: Monoid m => (a -> m) -> Array B ix a -> m #

foldr :: (a -> b -> b) -> b -> Array B ix a -> b #

foldr' :: (a -> b -> b) -> b -> Array B ix a -> b #

foldl :: (b -> a -> b) -> b -> Array B ix a -> b #

foldl' :: (b -> a -> b) -> b -> Array B ix a -> b #

foldr1 :: (a -> a -> a) -> Array B ix a -> a #

foldl1 :: (a -> a -> a) -> Array B ix a -> a #

toList :: Array B ix a -> [a] #

null :: Array B ix a -> Bool #

length :: Array B ix a -> Int #

elem :: Eq a => a -> Array B ix a -> Bool #

maximum :: Ord a => Array B ix a -> a #

minimum :: Ord a => Array B ix a -> a #

sum :: Num a => Array B ix a -> a #

product :: Num a => Array B ix a -> a #

Index ix => Foldable (Array DI ix) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Interleaved

Methods

fold :: Monoid m => Array DI ix m -> m #

foldMap :: Monoid m => (a -> m) -> Array DI ix a -> m #

foldr :: (a -> b -> b) -> b -> Array DI ix a -> b #

foldr' :: (a -> b -> b) -> b -> Array DI ix a -> b #

foldl :: (b -> a -> b) -> b -> Array DI ix a -> b #

foldl' :: (b -> a -> b) -> b -> Array DI ix a -> b #

foldr1 :: (a -> a -> a) -> Array DI ix a -> a #

foldl1 :: (a -> a -> a) -> Array DI ix a -> a #

toList :: Array DI ix a -> [a] #

null :: Array DI ix a -> Bool #

length :: Array DI ix a -> Int #

elem :: Eq a => a -> Array DI ix a -> Bool #

maximum :: Ord a => Array DI ix a -> a #

minimum :: Ord a => Array DI ix a -> a #

sum :: Num a => Array DI ix a -> a #

product :: Num a => Array DI ix a -> a #

Index ix => Traversable (Array B ix) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

traverse :: Applicative f => (a -> f b) -> Array B ix a -> f (Array B ix b) #

sequenceA :: Applicative f => Array B ix (f a) -> f (Array B ix a) #

mapM :: Monad m => (a -> m b) -> Array B ix a -> m (Array B ix b) #

sequence :: Monad m => Array B ix (m a) -> m (Array B ix a) #

Nested LN ix e => IsList (Array L ix e) Source # 
Instance details

Defined in Data.Massiv.Core.List

Associated Types

type Item (Array L ix e) :: Type #

Methods

fromList :: [Item (Array L ix e)] -> Array L ix e #

fromListN :: Int -> [Item (Array L ix e)] -> Array L ix e #

toList :: Array L ix e -> [Item (Array L ix e)] #

Nested LN ix e => IsList (Array LN ix e) Source # 
Instance details

Defined in Data.Massiv.Core.List

Associated Types

type Item (Array LN ix e) :: Type #

Methods

fromList :: [Item (Array LN ix e)] -> Array LN ix e #

fromListN :: Int -> [Item (Array LN ix e)] -> Array LN ix e #

toList :: Array LN ix e -> [Item (Array LN ix e)] #

(Unbox e, IsList (Array L ix e), Nested LN ix e, Nested L ix e, Ragged L ix e) => IsList (Array U ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Associated Types

type Item (Array U ix e) :: Type #

Methods

fromList :: [Item (Array U ix e)] -> Array U ix e #

fromListN :: Int -> [Item (Array U ix e)] -> Array U ix e #

toList :: Array U ix e -> [Item (Array U ix e)] #

(Prim e, IsList (Array L ix e), Nested LN ix e, Nested L ix e, Ragged L ix e) => IsList (Array P ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Associated Types

type Item (Array P ix e) :: Type #

Methods

fromList :: [Item (Array P ix e)] -> Array P ix e #

fromListN :: Int -> [Item (Array P ix e)] -> Array P ix e #

toList :: Array P ix e -> [Item (Array P ix e)] #

(Storable e, IsList (Array L ix e), Nested LN ix e, Nested L ix e, Ragged L ix e) => IsList (Array S ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Associated Types

type Item (Array S ix e) :: Type #

Methods

fromList :: [Item (Array S ix e)] -> Array S ix e #

fromListN :: Int -> [Item (Array S ix e)] -> Array S ix e #

toList :: Array S ix e -> [Item (Array S ix e)] #

IsList (Array DS Ix1 e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Stream

Associated Types

type Item (Array DS Ix1 e) :: Type #

Methods

fromList :: [Item (Array DS Ix1 e)] -> Array DS Ix1 e #

fromListN :: Int -> [Item (Array DS Ix1 e)] -> Array DS Ix1 e #

toList :: Array DS Ix1 e -> [Item (Array DS Ix1 e)] #

(NFData e, IsList (Array L ix e), Nested LN ix e, Nested L ix e, Ragged L ix e) => IsList (Array N ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Associated Types

type Item (Array N ix e) :: Type #

Methods

fromList :: [Item (Array N ix e)] -> Array N ix e #

fromListN :: Int -> [Item (Array N ix e)] -> Array N ix e #

toList :: Array N ix e -> [Item (Array N ix e)] #

(IsList (Array L ix e), Nested LN ix e, Nested L ix e, Ragged L ix e) => IsList (Array B ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Associated Types

type Item (Array B ix e) :: Type #

Methods

fromList :: [Item (Array B ix e)] -> Array B ix e #

fromListN :: Int -> [Item (Array B ix e)] -> Array B ix e #

toList :: Array B ix e -> [Item (Array B ix e)] #

(Eq e, Index ix) => Eq (Array D ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

(==) :: Array D ix e -> Array D ix e -> Bool #

(/=) :: Array D ix e -> Array D ix e -> Bool #

(Eq e, Index ix) => Eq (Array M ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Internal

Methods

(==) :: Array M ix e -> Array M ix e -> Bool #

(/=) :: Array M ix e -> Array M ix e -> Bool #

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

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

(==) :: Array U ix e -> Array U ix e -> Bool #

(/=) :: Array U ix e -> Array U ix e -> Bool #

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

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

(==) :: Array P ix e -> Array P ix e -> Bool #

(/=) :: Array P ix e -> Array P ix e -> Bool #

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

Defined in Data.Massiv.Array.Manifest.Storable

Methods

(==) :: Array S ix e -> Array S ix e -> Bool #

(/=) :: Array S ix e -> Array S ix e -> Bool #

(Index ix, NFData e, Eq e) => Eq (Array N ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

(==) :: Array N ix e -> Array N ix e -> Bool #

(/=) :: Array N ix e -> Array N ix e -> Bool #

(Index ix, Eq e) => Eq (Array B ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

(==) :: Array B ix e -> Array B ix e -> Bool #

(/=) :: Array B ix e -> Array B ix e -> Bool #

(Index ix, Eq e) => Eq (Array DI ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Interleaved

Methods

(==) :: Array DI ix e -> Array DI ix e -> Bool #

(/=) :: Array DI ix e -> Array DI ix e -> Bool #

(Index ix, Floating e) => Floating (Array D ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

pi :: Array D ix e #

exp :: Array D ix e -> Array D ix e #

log :: Array D ix e -> Array D ix e #

sqrt :: Array D ix e -> Array D ix e #

(**) :: Array D ix e -> Array D ix e -> Array D ix e #

logBase :: Array D ix e -> Array D ix e -> Array D ix e #

sin :: Array D ix e -> Array D ix e #

cos :: Array D ix e -> Array D ix e #

tan :: Array D ix e -> Array D ix e #

asin :: Array D ix e -> Array D ix e #

acos :: Array D ix e -> Array D ix e #

atan :: Array D ix e -> Array D ix e #

sinh :: Array D ix e -> Array D ix e #

cosh :: Array D ix e -> Array D ix e #

tanh :: Array D ix e -> Array D ix e #

asinh :: Array D ix e -> Array D ix e #

acosh :: Array D ix e -> Array D ix e #

atanh :: Array D ix e -> Array D ix e #

log1p :: Array D ix e -> Array D ix e #

expm1 :: Array D ix e -> Array D ix e #

log1pexp :: Array D ix e -> Array D ix e #

log1mexp :: Array D ix e -> Array D ix e #

(Index ix, Floating e) => Floating (Array DI ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Interleaved

Methods

pi :: Array DI ix e #

exp :: Array DI ix e -> Array DI ix e #

log :: Array DI ix e -> Array DI ix e #

sqrt :: Array DI ix e -> Array DI ix e #

(**) :: Array DI ix e -> Array DI ix e -> Array DI ix e #

logBase :: Array DI ix e -> Array DI ix e -> Array DI ix e #

sin :: Array DI ix e -> Array DI ix e #

cos :: Array DI ix e -> Array DI ix e #

tan :: Array DI ix e -> Array DI ix e #

asin :: Array DI ix e -> Array DI ix e #

acos :: Array DI ix e -> Array DI ix e #

atan :: Array DI ix e -> Array DI ix e #

sinh :: Array DI ix e -> Array DI ix e #

cosh :: Array DI ix e -> Array DI ix e #

tanh :: Array DI ix e -> Array DI ix e #

asinh :: Array DI ix e -> Array DI ix e #

acosh :: Array DI ix e -> Array DI ix e #

atanh :: Array DI ix e -> Array DI ix e #

log1p :: Array DI ix e -> Array DI ix e #

expm1 :: Array DI ix e -> Array DI ix e #

log1pexp :: Array DI ix e -> Array DI ix e #

log1mexp :: Array DI ix e -> Array DI ix e #

(Index ix, Fractional e) => Fractional (Array D ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

(/) :: Array D ix e -> Array D ix e -> Array D ix e #

recip :: Array D ix e -> Array D ix e #

fromRational :: Rational -> Array D ix e #

(Index ix, Fractional e) => Fractional (Array DI ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Interleaved

Methods

(/) :: Array DI ix e -> Array DI ix e -> Array DI ix e #

recip :: Array DI ix e -> Array DI ix e #

fromRational :: Rational -> Array DI ix e #

(Index ix, Num e) => Num (Array D ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

(+) :: Array D ix e -> Array D ix e -> Array D ix e #

(-) :: Array D ix e -> Array D ix e -> Array D ix e #

(*) :: Array D ix e -> Array D ix e -> Array D ix e #

negate :: Array D ix e -> Array D ix e #

abs :: Array D ix e -> Array D ix e #

signum :: Array D ix e -> Array D ix e #

fromInteger :: Integer -> Array D ix e #

(Index ix, Num e) => Num (Array DI ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Interleaved

Methods

(+) :: Array DI ix e -> Array DI ix e -> Array DI ix e #

(-) :: Array DI ix e -> Array DI ix e -> Array DI ix e #

(*) :: Array DI ix e -> Array DI ix e -> Array DI ix e #

negate :: Array DI ix e -> Array DI ix e #

abs :: Array DI ix e -> Array DI ix e #

signum :: Array DI ix e -> Array DI ix e #

fromInteger :: Integer -> Array DI ix e #

(Ord e, Index ix) => Ord (Array D ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

compare :: Array D ix e -> Array D ix e -> Ordering #

(<) :: Array D ix e -> Array D ix e -> Bool #

(<=) :: Array D ix e -> Array D ix e -> Bool #

(>) :: Array D ix e -> Array D ix e -> Bool #

(>=) :: Array D ix e -> Array D ix e -> Bool #

max :: Array D ix e -> Array D ix e -> Array D ix e #

min :: Array D ix e -> Array D ix e -> Array D ix e #

(Ord e, Index ix) => Ord (Array M ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Internal

Methods

compare :: Array M ix e -> Array M ix e -> Ordering #

(<) :: Array M ix e -> Array M ix e -> Bool #

(<=) :: Array M ix e -> Array M ix e -> Bool #

(>) :: Array M ix e -> Array M ix e -> Bool #

(>=) :: Array M ix e -> Array M ix e -> Bool #

max :: Array M ix e -> Array M ix e -> Array M ix e #

min :: Array M ix e -> Array M ix e -> Array M ix e #

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

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

compare :: Array U ix e -> Array U ix e -> Ordering #

(<) :: Array U ix e -> Array U ix e -> Bool #

(<=) :: Array U ix e -> Array U ix e -> Bool #

(>) :: Array U ix e -> Array U ix e -> Bool #

(>=) :: Array U ix e -> Array U ix e -> Bool #

max :: Array U ix e -> Array U ix e -> Array U ix e #

min :: Array U ix e -> Array U ix e -> Array U ix e #

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

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

compare :: Array P ix e -> Array P ix e -> Ordering #

(<) :: Array P ix e -> Array P ix e -> Bool #

(<=) :: Array P ix e -> Array P ix e -> Bool #

(>) :: Array P ix e -> Array P ix e -> Bool #

(>=) :: Array P ix e -> Array P ix e -> Bool #

max :: Array P ix e -> Array P ix e -> Array P ix e #

min :: Array P ix e -> Array P ix e -> Array P ix e #

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

Defined in Data.Massiv.Array.Manifest.Storable

Methods

compare :: Array S ix e -> Array S ix e -> Ordering #

(<) :: Array S ix e -> Array S ix e -> Bool #

(<=) :: Array S ix e -> Array S ix e -> Bool #

(>) :: Array S ix e -> Array S ix e -> Bool #

(>=) :: Array S ix e -> Array S ix e -> Bool #

max :: Array S ix e -> Array S ix e -> Array S ix e #

min :: Array S ix e -> Array S ix e -> Array S ix e #

(Index ix, NFData e, Ord e) => Ord (Array N ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

compare :: Array N ix e -> Array N ix e -> Ordering #

(<) :: Array N ix e -> Array N ix e -> Bool #

(<=) :: Array N ix e -> Array N ix e -> Bool #

(>) :: Array N ix e -> Array N ix e -> Bool #

(>=) :: Array N ix e -> Array N ix e -> Bool #

max :: Array N ix e -> Array N ix e -> Array N ix e #

min :: Array N ix e -> Array N ix e -> Array N ix e #

(Index ix, Ord e) => Ord (Array B ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

compare :: Array B ix e -> Array B ix e -> Ordering #

(<) :: Array B ix e -> Array B ix e -> Bool #

(<=) :: Array B ix e -> Array B ix e -> Bool #

(>) :: Array B ix e -> Array B ix e -> Bool #

(>=) :: Array B ix e -> Array B ix e -> Bool #

max :: Array B ix e -> Array B ix e -> Array B ix e #

min :: Array B ix e -> Array B ix e -> Array B ix e #

(Index ix, Ord e) => Ord (Array DI ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Interleaved

Methods

compare :: Array DI ix e -> Array DI ix e -> Ordering #

(<) :: Array DI ix e -> Array DI ix e -> Bool #

(<=) :: Array DI ix e -> Array DI ix e -> Bool #

(>) :: Array DI ix e -> Array DI ix e -> Bool #

(>=) :: Array DI ix e -> Array DI ix e -> Bool #

max :: Array DI ix e -> Array DI ix e -> Array DI ix e #

min :: Array DI ix e -> Array DI ix e -> Array DI ix e #

(Ragged L ix e, Show e) => Show (Array DL ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

showsPrec :: Int -> Array DL ix e -> ShowS #

show :: Array DL ix e -> String #

showList :: [Array DL ix e] -> ShowS #

(Ragged L ix e, Show e) => Show (Array L ix e) Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

showsPrec :: Int -> Array L ix e -> ShowS #

show :: Array L ix e -> String #

showList :: [Array L ix e] -> ShowS #

(Ragged L ix e, Show e) => Show (Array LN ix e) Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

showsPrec :: Int -> Array LN ix e -> ShowS #

show :: Array LN ix e -> String #

showList :: [Array LN ix e] -> ShowS #

(Ragged L ix e, Show e) => Show (Array D ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

showsPrec :: Int -> Array D ix e -> ShowS #

show :: Array D ix e -> String #

showList :: [Array D ix e] -> ShowS #

(Ragged L ix e, Show e) => Show (Array M ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Internal

Methods

showsPrec :: Int -> Array M ix e -> ShowS #

show :: Array M ix e -> String #

showList :: [Array M ix e] -> ShowS #

(Ragged L ix e, Show e, Unbox e) => Show (Array U ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

showsPrec :: Int -> Array U ix e -> ShowS #

show :: Array U ix e -> String #

showList :: [Array U ix e] -> ShowS #

(Ragged L ix e, Show e, Prim e) => Show (Array P ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

showsPrec :: Int -> Array P ix e -> ShowS #

show :: Array P ix e -> String #

showList :: [Array P ix e] -> ShowS #

(Ragged L ix e, Show e, Storable e) => Show (Array S ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

showsPrec :: Int -> Array S ix e -> ShowS #

show :: Array S ix e -> String #

showList :: [Array S ix e] -> ShowS #

Show e => Show (Array DS Ix1 e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

showsPrec :: Int -> Array DS Ix1 e -> ShowS #

show :: Array DS Ix1 e -> String #

showList :: [Array DS Ix1 e] -> ShowS #

(Ragged L ix e, Show e, NFData e) => Show (Array N ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

showsPrec :: Int -> Array N ix e -> ShowS #

show :: Array N ix e -> String #

showList :: [Array N ix e] -> ShowS #

(Ragged L ix e, Show e) => Show (Array B ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

showsPrec :: Int -> Array B ix e -> ShowS #

show :: Array B ix e -> String #

showList :: [Array B ix e] -> ShowS #

(Ragged L ix e, Load DW ix e, Show e) => Show (Array DW ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

showsPrec :: Int -> Array DW ix e -> ShowS #

show :: Array DW ix e -> String #

showList :: [Array DW ix e] -> ShowS #

(Ragged L ix e, Show e) => Show (Array DI ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Interleaved

Methods

showsPrec :: Int -> Array DI ix e -> ShowS #

show :: Array DI ix e -> String #

showList :: [Array DI ix e] -> ShowS #

Semigroup (Array DL Ix1 e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Push

Methods

(<>) :: Array DL Ix1 e -> Array DL Ix1 e -> Array DL Ix1 e #

sconcat :: NonEmpty (Array DL Ix1 e) -> Array DL Ix1 e #

stimes :: Integral b => b -> Array DL Ix1 e -> Array DL Ix1 e #

Semigroup (Array DS Ix1 e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Stream

Methods

(<>) :: Array DS Ix1 e -> Array DS Ix1 e -> Array DS Ix1 e #

sconcat :: NonEmpty (Array DS Ix1 e) -> Array DS Ix1 e #

stimes :: Integral b => b -> Array DS Ix1 e -> Array DS Ix1 e #

Monoid (Array DL Ix1 e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Push

Methods

mempty :: Array DL Ix1 e #

mappend :: Array DL Ix1 e -> Array DL Ix1 e -> Array DL Ix1 e #

mconcat :: [Array DL Ix1 e] -> Array DL Ix1 e #

Monoid (Array DS Ix1 e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Stream

Methods

mempty :: Array DS Ix1 e #

mappend :: Array DS Ix1 e -> Array DS Ix1 e -> Array DS Ix1 e #

mconcat :: [Array DS Ix1 e] -> Array DS Ix1 e #

NFData ix => NFData (Array U ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

rnf :: Array U ix e -> () #

Index ix => NFData (Array P ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

rnf :: Array P ix e -> () #

NFData ix => NFData (Array S ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

rnf :: Array S ix e -> () #

(Index ix, NFData e) => NFData (Array N ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

rnf :: Array N ix e -> () #

(Index ix, NFData e) => NFData (Array B ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

rnf :: Array B ix e -> () #

data Array DL ix e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Push

data Array DL ix e = DLArray {}
data Array L ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

data Array L ix e = LArray {}
newtype Array LN ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

newtype Array LN ix e = List {}
data Array D ix e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

data Array D ix e = DArray {}
data Array M ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Internal

data Array M ix e = MArray {}
data Array U ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

data Array U ix e = UArray {}
data Array P ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

data Array P ix e = PArray {}
data Array S ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

data Array S ix e = SArray {}
newtype Array N ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

newtype Array N ix e = NArray {}
data Array B ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

data Array B ix e = BArray {}
data Array DW ix e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

data Array DW ix e = DWArray {}
newtype Array DI ix e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Interleaved

newtype Array DI ix e = DIArray {}
newtype Array DS Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Stream

newtype Array DS Ix1 e = DSArray {}
type Item (Array L ix e) Source # 
Instance details

Defined in Data.Massiv.Core.List

type Item (Array L ix e) = ListItem ix e
type Item (Array LN ix e) Source # 
Instance details

Defined in Data.Massiv.Core.List

type Item (Array LN ix e) = ListItem ix e
type Item (Array U ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

type Item (Array U ix e) = Item (Array L ix e)
type Item (Array P ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

type Item (Array P ix e) = Item (Array L ix e)
type Item (Array S ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

type Item (Array S ix e) = Item (Array L ix e)
type Item (Array DS Ix1 e) Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Stream

type Item (Array DS Ix1 e) = e
type Item (Array N ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

type Item (Array N ix e) = Item (Array L ix e)
type Item (Array B ix e) Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

type Item (Array B ix e) = Item (Array L ix e)

type Vector r e = Array r Ix1 e Source #

Type synonym for a single dimension array, or simply a flat vector.

Since: 0.5.0

type MVector s r e = MArray s r Ix1 e Source #

Type synonym for a single dimension mutable array, or simply a flat mutable vector.

Since: 0.5.0

type Matrix r e = Array r Ix2 e Source #

Type synonym for a two-dimentsional array, or simply a matrix.

Since: 0.5.0

type MMatrix s r e = MArray s r Ix2 e Source #

Type synonym for a two-dimentsional mutable array, or simply a mutable matrix.

Since: 0.5.0

type family Elt r ix e :: * where ... Source #

Equations

Elt r Ix1 e = e 
Elt r ix e = Array (R r) (Lower ix) e 

class (Typeable r, Index ix) => Construct r ix e Source #

Array types that can be constructed.

Minimal complete definition

setComp, (makeArray | makeArrayLinear)

Instances
Index ix => Construct DL ix e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Push

Methods

setComp :: Comp -> Array DL ix e -> Array DL ix e Source #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array DL ix e Source #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array DL ix e Source #

(Index ix, Ragged L ix e, Ragged L (Lower ix) e, Elt L ix e ~ Array L (Lower ix) e) => Construct L ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

setComp :: Comp -> Array L ix e -> Array L ix e Source #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array L ix e Source #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array L ix e Source #

Construct L Ix1 e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

setComp :: Comp -> Array L Ix1 e -> Array L Ix1 e Source #

makeArray :: Comp -> Sz Ix1 -> (Ix1 -> e) -> Array L Ix1 e Source #

makeArrayLinear :: Comp -> Sz Ix1 -> (Int -> e) -> Array L Ix1 e Source #

Construct LN Ix1 e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

setComp :: Comp -> Array LN Ix1 e -> Array LN Ix1 e Source #

makeArray :: Comp -> Sz Ix1 -> (Ix1 -> e) -> Array LN Ix1 e Source #

makeArrayLinear :: Comp -> Sz Ix1 -> (Int -> e) -> Array LN Ix1 e Source #

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

Defined in Data.Massiv.Array.Delayed.Pull

Methods

setComp :: Comp -> Array D ix e -> Array D ix e Source #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array D ix e Source #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array D ix e Source #

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

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

setComp :: Comp -> Array U ix e -> Array U ix e Source #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array U ix e Source #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array U ix e Source #

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

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

setComp :: Comp -> Array P ix e -> Array P ix e Source #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array P ix e Source #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array P ix e Source #

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

Defined in Data.Massiv.Array.Manifest.Storable

Methods

setComp :: Comp -> Array S ix e -> Array S ix e Source #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array S ix e Source #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array S ix e Source #

Construct DS Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Stream

Methods

setComp :: Comp -> Array DS Ix1 e -> Array DS Ix1 e Source #

makeArray :: Comp -> Sz Ix1 -> (Ix1 -> e) -> Array DS Ix1 e Source #

makeArrayLinear :: Comp -> Sz Ix1 -> (Int -> e) -> Array DS Ix1 e Source #

(Index ix, NFData e) => Construct N ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

setComp :: Comp -> Array N ix e -> Array N ix e Source #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array N ix e Source #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array N ix e Source #

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

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

setComp :: Comp -> Array B ix e -> Array B ix e Source #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array B ix e Source #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array B ix e Source #

Index ix => Construct DW ix e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

setComp :: Comp -> Array DW ix e -> Array DW ix e Source #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array DW ix e Source #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array DW ix e Source #

Index ix => Construct DI ix e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Interleaved

Methods

setComp :: Comp -> Array DI ix e -> Array DI ix e Source #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array DI ix e Source #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array DI ix e Source #

class (Typeable r, Index ix) => Load r ix e where Source #

Any array that can be computed and loaded into memory

Minimal complete definition

getComp, size, loadArrayM

Associated Types

type R r :: * Source #

Methods

loadArrayM Source #

Arguments

:: Monad m 
=> Scheduler m () 
-> Array r ix e

Array that is being loaded

-> (Int -> e -> m ())

Function that writes an element into target array

-> m () 

Load an array into memory.

Since: 0.3.0

defaultElement :: Array r ix e -> Maybe e Source #

Instances
Index ix => Load DL ix e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Push

Associated Types

type R DL :: Type Source #

Methods

getComp :: Array DL ix e -> Comp Source #

size :: Array DL ix e -> Sz ix Source #

loadArrayM :: Monad m => Scheduler m () -> Array DL ix e -> (Int -> e -> m ()) -> m () Source #

defaultElement :: Array DL ix e -> Maybe e Source #

maxSize :: Array DL ix e -> Maybe (Sz ix) Source #

isEmpty :: Array DL ix e -> Bool Source #

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array DL ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array DL ix e -> m (MArray RealWorld r' ix e)

(Index ix, Ragged L ix e) => Load L ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

Associated Types

type R L :: Type Source #

Methods

getComp :: Array L ix e -> Comp Source #

size :: Array L ix e -> Sz ix Source #

loadArrayM :: Monad m => Scheduler m () -> Array L ix e -> (Int -> e -> m ()) -> m () Source #

defaultElement :: Array L ix e -> Maybe e Source #

maxSize :: Array L ix e -> Maybe (Sz ix) Source #

isEmpty :: Array L ix e -> Bool Source #

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array L ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array L ix e -> m (MArray RealWorld r' ix e)

(Index ix, Load L ix e, Ragged L ix e) => Load LN ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

Associated Types

type R LN :: Type Source #

Methods

getComp :: Array LN ix e -> Comp Source #

size :: Array LN ix e -> Sz ix Source #

loadArrayM :: Monad m => Scheduler m () -> Array LN ix e -> (Int -> e -> m ()) -> m () Source #

defaultElement :: Array LN ix e -> Maybe e Source #

maxSize :: Array LN ix e -> Maybe (Sz ix) Source #

isEmpty :: Array LN ix e -> Bool Source #

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array LN ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array LN ix e -> m (MArray RealWorld r' ix e)

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

Defined in Data.Massiv.Array.Delayed.Pull

Associated Types

type R D :: Type Source #

Methods

getComp :: Array D ix e -> Comp Source #

size :: Array D ix e -> Sz ix Source #

loadArrayM :: Monad m => Scheduler m () -> Array D ix e -> (Int -> e -> m ()) -> m () Source #

defaultElement :: Array D ix e -> Maybe e Source #

maxSize :: Array D ix e -> Maybe (Sz ix) Source #

isEmpty :: Array D ix e -> Bool Source #

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array D ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array D ix e -> m (MArray RealWorld r' ix e)

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

Defined in Data.Massiv.Array.Manifest.Internal

Associated Types

type R M :: Type Source #

Methods

getComp :: Array M ix e -> Comp Source #

size :: Array M ix e -> Sz ix Source #

loadArrayM :: Monad m => Scheduler m () -> Array M ix e -> (Int -> e -> m ()) -> m () Source #

defaultElement :: Array M ix e -> Maybe e Source #

maxSize :: Array M ix e -> Maybe (Sz ix) Source #

isEmpty :: Array M ix e -> Bool Source #

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array M ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array M ix e -> m (MArray RealWorld r' ix e)

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

Defined in Data.Massiv.Array.Manifest.Unboxed

Associated Types

type R U :: Type Source #

Methods

getComp :: Array U ix e -> Comp Source #

size :: Array U ix e -> Sz ix Source #

loadArrayM :: Monad m => Scheduler m () -> Array U ix e -> (Int -> e -> m ()) -> m () Source #

defaultElement :: Array U ix e -> Maybe e Source #

maxSize :: Array U ix e -> Maybe (Sz ix) Source #

isEmpty :: Array U ix e -> Bool Source #

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array U ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array U ix e -> m (MArray RealWorld r' ix e)

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

Defined in Data.Massiv.Array.Manifest.Primitive

Associated Types

type R P :: Type Source #

Methods

getComp :: Array P ix e -> Comp Source #

size :: Array P ix e -> Sz ix Source #

loadArrayM :: Monad m => Scheduler m () -> Array P ix e -> (Int -> e -> m ()) -> m () Source #

defaultElement :: Array P ix e -> Maybe e Source #

maxSize :: Array P ix e -> Maybe (Sz ix) Source #

isEmpty :: Array P ix e -> Bool Source #

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array P ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array P ix e -> m (MArray RealWorld r' ix e)

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

Defined in Data.Massiv.Array.Manifest.Storable

Associated Types

type R S :: Type Source #

Methods

getComp :: Array S ix e -> Comp Source #

size :: Array S ix e -> Sz ix Source #

loadArrayM :: Monad m => Scheduler m () -> Array S ix e -> (Int -> e -> m ()) -> m () Source #

defaultElement :: Array S ix e -> Maybe e Source #

maxSize :: Array S ix e -> Maybe (Sz ix) Source #

isEmpty :: Array S ix e -> Bool Source #

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array S ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array S ix e -> m (MArray RealWorld r' ix e)

Load DS Ix1 e Source #

O(n) - size implementation.

Instance details

Defined in Data.Massiv.Array.Delayed.Stream

Associated Types

type R DS :: Type Source #

Methods

getComp :: Array DS Ix1 e -> Comp Source #

size :: Array DS Ix1 e -> Sz Ix1 Source #

loadArrayM :: Monad m => Scheduler m () -> Array DS Ix1 e -> (Int -> e -> m ()) -> m () Source #

defaultElement :: Array DS Ix1 e -> Maybe e Source #

maxSize :: Array DS Ix1 e -> Maybe (Sz Ix1) Source #

isEmpty :: Array DS Ix1 e -> Bool Source #

unsafeLoadIntoS :: (Mutable r' Ix1 e, PrimMonad m) => MArray (PrimState m) r' Ix1 e -> Array DS Ix1 e -> m (MArray (PrimState m) r' Ix1 e)

unsafeLoadInto :: (Mutable r' Ix1 e, MonadIO m) => MArray RealWorld r' Ix1 e -> Array DS Ix1 e -> m (MArray RealWorld r' Ix1 e)

(Index ix, NFData e) => Load N ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Associated Types

type R N :: Type Source #

Methods

getComp :: Array N ix e -> Comp Source #

size :: Array N ix e -> Sz ix Source #

loadArrayM :: Monad m => Scheduler m () -> Array N ix e -> (Int -> e -> m ()) -> m () Source #

defaultElement :: Array N ix e -> Maybe e Source #

maxSize :: Array N ix e -> Maybe (Sz ix) Source #

isEmpty :: Array N ix e -> Bool Source #

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array N ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array N ix e -> m (MArray RealWorld r' ix e)

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

Defined in Data.Massiv.Array.Manifest.Boxed

Associated Types

type R B :: Type Source #

Methods

getComp :: Array B ix e -> Comp Source #

size :: Array B ix e -> Sz ix Source #

loadArrayM :: Monad m => Scheduler m () -> Array B ix e -> (Int -> e -> m ()) -> m () Source #

defaultElement :: Array B ix e -> Maybe e Source #

maxSize :: Array B ix e -> Maybe (Sz ix) Source #

isEmpty :: Array B ix e -> Bool Source #

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array B ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array B ix e -> m (MArray RealWorld r' ix e)

Load DW Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Associated Types

type R DW :: Type Source #

Methods

getComp :: Array DW Ix1 e -> Comp Source #

size :: Array DW Ix1 e -> Sz Ix1 Source #

loadArrayM :: Monad m => Scheduler m () -> Array DW Ix1 e -> (Int -> e -> m ()) -> m () Source #

defaultElement :: Array DW Ix1 e -> Maybe e Source #

maxSize :: Array DW Ix1 e -> Maybe (Sz Ix1) Source #

isEmpty :: Array DW Ix1 e -> Bool Source #

unsafeLoadIntoS :: (Mutable r' Ix1 e, PrimMonad m) => MArray (PrimState m) r' Ix1 e -> Array DW Ix1 e -> m (MArray (PrimState m) r' Ix1 e)

unsafeLoadInto :: (Mutable r' Ix1 e, MonadIO m) => MArray RealWorld r' Ix1 e -> Array DW Ix1 e -> m (MArray RealWorld r' Ix1 e)

Load DW Ix2 e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Associated Types

type R DW :: Type Source #

Methods

getComp :: Array DW Ix2 e -> Comp Source #

size :: Array DW Ix2 e -> Sz Ix2 Source #

loadArrayM :: Monad m => Scheduler m () -> Array DW Ix2 e -> (Int -> e -> m ()) -> m () Source #

defaultElement :: Array DW Ix2 e -> Maybe e Source #

maxSize :: Array DW Ix2 e -> Maybe (Sz Ix2) Source #

isEmpty :: Array DW Ix2 e -> Bool Source #

unsafeLoadIntoS :: (Mutable r' Ix2 e, PrimMonad m) => MArray (PrimState m) r' Ix2 e -> Array DW Ix2 e -> m (MArray (PrimState m) r' Ix2 e)

unsafeLoadInto :: (Mutable r' Ix2 e, MonadIO m) => MArray RealWorld r' Ix2 e -> Array DW Ix2 e -> m (MArray RealWorld r' Ix2 e)

Load DW Ix5T e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Associated Types

type R DW :: Type Source #

Load DW Ix4T e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Associated Types

type R DW :: Type Source #

Load DW Ix3T e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Associated Types

type R DW :: Type Source #

Load DW Ix2T e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Associated Types

type R DW :: Type Source #

Index ix => Load DI ix e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Interleaved

Associated Types

type R DI :: Type Source #

Methods

getComp :: Array DI ix e -> Comp Source #

size :: Array DI ix e -> Sz ix Source #

loadArrayM :: Monad m => Scheduler m () -> Array DI ix e -> (Int -> e -> m ()) -> m () Source #

defaultElement :: Array DI ix e -> Maybe e Source #

maxSize :: Array DI ix e -> Maybe (Sz ix) Source #

isEmpty :: Array DI ix e -> Bool Source #

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array DI ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array DI ix e -> m (MArray RealWorld r' ix e)

(Index (IxN n), Load DW (Ix (n - 1)) e) => Load DW (IxN n) e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Associated Types

type R DW :: Type Source #

Methods

getComp :: Array DW (IxN n) e -> Comp Source #

size :: Array DW (IxN n) e -> Sz (IxN n) Source #

loadArrayM :: Monad m => Scheduler m () -> Array DW (IxN n) e -> (Int -> e -> m ()) -> m () Source #

defaultElement :: Array DW (IxN n) e -> Maybe e Source #

maxSize :: Array DW (IxN n) e -> Maybe (Sz (IxN n)) Source #

isEmpty :: Array DW (IxN n) e -> Bool Source #

unsafeLoadIntoS :: (Mutable r' (IxN n) e, PrimMonad m) => MArray (PrimState m) r' (IxN n) e -> Array DW (IxN n) e -> m (MArray (PrimState m) r' (IxN n) e)

unsafeLoadInto :: (Mutable r' (IxN n) e, MonadIO m) => MArray RealWorld r' (IxN n) e -> Array DW (IxN n) e -> m (MArray RealWorld r' (IxN n) e)

class Load r ix e => Stream r ix e where Source #

Methods

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

toStreamIx :: Array r ix e -> Steps Id (ix, e) Source #

Instances
Stream L Ix1 e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

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

toStreamIx :: Array L Ix1 e -> Steps Id (Ix1, 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 #

toStreamIx :: Array LN Ix1 e -> Steps Id (Ix1, 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 #

toStreamIx :: Array D ix e -> Steps Id (ix, 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 #

toStreamIx :: Array M ix e -> Steps Id (ix, 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 #

toStreamIx :: Array U ix e -> Steps Id (ix, 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 #

toStreamIx :: Array P ix e -> Steps Id (ix, 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 #

toStreamIx :: Array S ix e -> Steps Id (ix, 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 #

toStreamIx :: Array DS Ix1 e -> Steps Id (Ix1, e) Source #

(Index ix, NFData e) => Stream N ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

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

toStreamIx :: Array N ix e -> Steps Id (ix, 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 #

toStreamIx :: Array B ix e -> Steps Id (ix, e) Source #

class Load r ix e => Source r ix e Source #

Arrays that can be used as source to practically any manipulation function.

Minimal complete definition

(unsafeIndex | unsafeLinearIndex), unsafeLinearSlice

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

Defined in Data.Massiv.Array.Delayed.Pull

Methods

unsafeIndex :: Array D ix e -> ix -> e Source #

unsafeLinearIndex :: Array D ix e -> Int -> e Source #

unsafeLinearSlice :: Ix1 -> Sz1 -> Array D ix e -> Array D Ix1 e Source #

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

Defined in Data.Massiv.Array.Manifest.Internal

Methods

unsafeIndex :: Array M ix e -> ix -> e Source #

unsafeLinearIndex :: Array M ix e -> Int -> e Source #

unsafeLinearSlice :: Ix1 -> Sz1 -> Array M ix e -> Array M Ix1 e Source #

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

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeIndex :: Array U ix e -> ix -> e Source #

unsafeLinearIndex :: Array U ix e -> Int -> e Source #

unsafeLinearSlice :: Ix1 -> Sz1 -> Array U ix e -> Array U Ix1 e Source #

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

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeIndex :: Array P ix e -> ix -> e Source #

unsafeLinearIndex :: Array P ix e -> Int -> e Source #

unsafeLinearSlice :: Ix1 -> Sz1 -> Array P ix e -> Array P Ix1 e Source #

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

Defined in Data.Massiv.Array.Manifest.Storable

Methods

unsafeIndex :: Array S ix e -> ix -> e Source #

unsafeLinearIndex :: Array S ix e -> Int -> e Source #

unsafeLinearSlice :: Ix1 -> Sz1 -> Array S ix e -> Array S Ix1 e Source #

(Index ix, NFData e) => Source N ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeIndex :: Array N ix e -> ix -> e Source #

unsafeLinearIndex :: Array N ix e -> Int -> e Source #

unsafeLinearSlice :: Ix1 -> Sz1 -> Array N ix e -> Array N Ix1 e Source #

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

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeIndex :: Array B ix e -> ix -> e Source #

unsafeLinearIndex :: Array B ix e -> Int -> e Source #

unsafeLinearSlice :: Ix1 -> Sz1 -> Array B ix e -> Array B Ix1 e Source #

class Index ix => Resize r ix Source #

Minimal complete definition

unsafeResize

Instances
Index ix => Resize DL ix Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Push

Methods

unsafeResize :: Index ix' => Sz ix' -> Array DL ix e -> Array DL ix' e Source #

Index ix => Resize D ix Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

unsafeResize :: Index ix' => Sz ix' -> Array D ix e -> Array D ix' e Source #

Index ix => Resize M ix Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Internal

Methods

unsafeResize :: Index ix' => Sz ix' -> Array M ix e -> Array M ix' e Source #

Index ix => Resize U ix Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeResize :: Index ix' => Sz ix' -> Array U ix e -> Array U ix' e Source #

Index ix => Resize P ix Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeResize :: Index ix' => Sz ix' -> Array P ix e -> Array P ix' e Source #

Index ix => Resize S ix Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

unsafeResize :: Index ix' => Sz ix' -> Array S ix e -> Array S ix' e Source #

Index ix => Resize N ix Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeResize :: Index ix' => Sz ix' -> Array N ix e -> Array N ix' e Source #

Index ix => Resize B ix Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeResize :: Index ix' => Sz ix' -> Array B ix e -> Array B ix' e Source #

Index ix => Resize DI ix Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Interleaved

Methods

unsafeResize :: Index ix' => Sz ix' -> Array DI ix e -> Array DI ix' e Source #

class Load r ix e => Extract r ix e Source #

Minimal complete definition

unsafeExtract

Instances
Index ix => Extract D ix e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

unsafeExtract :: ix -> Sz ix -> Array D ix e -> Array (R D) ix e Source #

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

Defined in Data.Massiv.Array.Manifest.Internal

Methods

unsafeExtract :: ix -> Sz ix -> Array M ix e -> Array (R M) ix e Source #

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

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeExtract :: ix -> Sz ix -> Array U ix e -> Array (R U) ix e Source #

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

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeExtract :: ix -> Sz ix -> Array P ix e -> Array (R P) ix e Source #

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

Defined in Data.Massiv.Array.Manifest.Storable

Methods

unsafeExtract :: ix -> Sz ix -> Array S ix e -> Array (R S) ix e Source #

Extract DS Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Stream

Methods

unsafeExtract :: Ix1 -> Sz Ix1 -> Array DS Ix1 e -> Array (R DS) Ix1 e Source #

(Index ix, NFData e) => Extract N ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeExtract :: ix -> Sz ix -> Array N ix e -> Array (R N) ix e Source #

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

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeExtract :: ix -> Sz ix -> Array B ix e -> Array (R B) ix e Source #

Index ix => Extract DI ix e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Interleaved

Methods

unsafeExtract :: ix -> Sz ix -> Array DI ix e -> Array (R DI) ix e Source #

class Load r ix e => StrideLoad r ix e where Source #

Minimal complete definition

Nothing

Methods

loadArrayWithStrideM Source #

Arguments

:: Monad m 
=> Scheduler m () 
-> Stride ix

Stride to use

-> Sz ix

Size of the target array affected by the stride.

-> Array r ix e

Array that is being loaded

-> (Int -> e -> m ())

Function that writes an element into target array

-> m () 

Load an array into memory with stride. Default implementation requires an instance of Source.

loadArrayWithStrideM Source #

Arguments

:: (Source r ix e, Monad m) 
=> Scheduler m () 
-> Stride ix

Stride to use

-> Sz ix

Size of the target array affected by the stride.

-> Array r ix e

Array that is being loaded

-> (Int -> e -> m ())

Function that writes an element into target array

-> m () 

Load an array into memory with stride. Default implementation requires an instance of Source.

Instances
Index ix => StrideLoad D ix e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride ix -> Sz ix -> Array D ix e -> (Int -> e -> m ()) -> m () Source #

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

Defined in Data.Massiv.Array.Manifest.Internal

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride ix -> Sz ix -> Array M ix e -> (Int -> e -> m ()) -> m () Source #

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

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride ix -> Sz ix -> Array U ix e -> (Int -> e -> m ()) -> m () Source #

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

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride ix -> Sz ix -> Array P ix e -> (Int -> e -> m ()) -> m () Source #

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

Defined in Data.Massiv.Array.Manifest.Storable

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride ix -> Sz ix -> Array S ix e -> (Int -> e -> m ()) -> m () Source #

(Index ix, NFData e) => StrideLoad N ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride ix -> Sz ix -> Array N ix e -> (Int -> e -> m ()) -> m () Source #

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

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride ix -> Sz ix -> Array B ix e -> (Int -> e -> m ()) -> m () Source #

StrideLoad DW Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride Ix1 -> Sz Ix1 -> Array DW Ix1 e -> (Int -> e -> m ()) -> m () Source #

StrideLoad DW Ix2 e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride Ix2 -> Sz Ix2 -> Array DW Ix2 e -> (Int -> e -> m ()) -> m () Source #

StrideLoad DW Ix5T e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride Ix5T -> Sz Ix5T -> Array DW Ix5T e -> (Int -> e -> m ()) -> m () Source #

StrideLoad DW Ix4T e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride Ix4T -> Sz Ix4T -> Array DW Ix4T e -> (Int -> e -> m ()) -> m () Source #

StrideLoad DW Ix3T e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride Ix3T -> Sz Ix3T -> Array DW Ix3T e -> (Int -> e -> m ()) -> m () Source #

StrideLoad DW Ix2T e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride Ix2T -> Sz Ix2T -> Array DW Ix2T e -> (Int -> e -> m ()) -> m () Source #

Index ix => StrideLoad DI ix e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Interleaved

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride ix -> Sz ix -> Array DI ix e -> (Int -> e -> m ()) -> m () Source #

(Index (IxN n), StrideLoad DW (Ix (n - 1)) e) => StrideLoad DW (IxN n) e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Windowed

Methods

loadArrayWithStrideM :: Monad m => Scheduler m () -> Stride (IxN n) -> Sz (IxN n) -> Array DW (IxN n) e -> (Int -> e -> m ()) -> m () Source #

class Load r ix e => Slice r ix e Source #

Minimal complete definition

unsafeSlice

Instances
(Index ix, Index (Lower ix), Elt D ix e ~ Array D (Lower ix) e) => Slice D ix e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

unsafeSlice :: MonadThrow m => Array D ix e -> ix -> Sz ix -> Dim -> m (Elt D ix e) Source #

(Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e) => Slice M ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Internal

Methods

unsafeSlice :: MonadThrow m => Array M ix e -> ix -> Sz ix -> Dim -> m (Elt M ix e) Source #

Slice M Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Internal

Methods

unsafeSlice :: MonadThrow m => Array M Ix1 e -> Ix1 -> Sz Ix1 -> Dim -> m (Elt M Ix1 e) Source #

(Unbox e, Index ix, Index (Lower ix), Elt U ix e ~ Elt M ix e, Elt M ix e ~ Array M (Lower ix) e) => Slice U ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeSlice :: MonadThrow m => Array U ix e -> ix -> Sz ix -> Dim -> m (Elt U ix e) Source #

Unbox e => Slice U Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeSlice :: MonadThrow m => Array U Ix1 e -> Ix1 -> Sz Ix1 -> Dim -> m (Elt U Ix1 e) Source #

(Prim e, Index ix, Index (Lower ix), Elt P ix e ~ Elt M ix e, Elt M ix e ~ Array M (Lower ix) e) => Slice P ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeSlice :: MonadThrow m => Array P ix e -> ix -> Sz ix -> Dim -> m (Elt P ix e) Source #

Prim e => Slice P Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeSlice :: MonadThrow m => Array P Ix1 e -> Ix1 -> Sz Ix1 -> Dim -> m (Elt P Ix1 e) Source #

Storable e => Slice S Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

unsafeSlice :: MonadThrow m => Array S Ix1 e -> Ix1 -> Sz Ix1 -> Dim -> m (Elt S Ix1 e) Source #

NFData e => Slice N Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeSlice :: MonadThrow m => Array N Ix1 e -> Ix1 -> Sz Ix1 -> Dim -> m (Elt N Ix1 e) Source #

Slice B Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeSlice :: MonadThrow m => Array B Ix1 e -> Ix1 -> Sz Ix1 -> Dim -> m (Elt B Ix1 e) Source #

class Load r ix e => OuterSlice r ix e Source #

Minimal complete definition

unsafeOuterSlice

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

Defined in Data.Massiv.Core.List

Methods

unsafeOuterSlice :: Array L ix e -> Int -> Elt L ix e Source #

OuterSlice L Ix1 e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

unsafeOuterSlice :: Array L Ix1 e -> Int -> Elt L Ix1 e Source #

(Elt D ix e ~ Array D (Lower ix) e, Index ix) => OuterSlice D ix e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

unsafeOuterSlice :: Array D ix e -> Int -> Elt D ix e Source #

(Elt M ix e ~ Array M (Lower ix) e, Index ix, Index (Lower ix)) => OuterSlice M ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Internal

Methods

unsafeOuterSlice :: Array M ix e -> Int -> Elt M ix e Source #

OuterSlice M Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Internal

Methods

unsafeOuterSlice :: Array M Ix1 e -> Int -> Elt M Ix1 e Source #

(Unbox e, Index ix, Index (Lower ix), Elt U ix e ~ Elt M ix e, Elt M ix e ~ Array M (Lower ix) e) => OuterSlice U ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeOuterSlice :: Array U ix e -> Int -> Elt U ix e Source #

Unbox e => OuterSlice U Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeOuterSlice :: Array U Ix1 e -> Int -> Elt U Ix1 e Source #

(Prim e, Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt P ix e ~ Array M (Lower ix) e) => OuterSlice P ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeOuterSlice :: Array P ix e -> Int -> Elt P ix e Source #

Prim e => OuterSlice P Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeOuterSlice :: Array P Ix1 e -> Int -> Elt P Ix1 e Source #

(Storable e, Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt S ix e ~ Array M (Lower ix) e) => OuterSlice S ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

unsafeOuterSlice :: Array S ix e -> Int -> Elt S ix e Source #

(NFData e, Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt N ix e ~ Array M (Lower ix) e) => OuterSlice N ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeOuterSlice :: Array N ix e -> Int -> Elt N ix e Source #

(Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt B ix e ~ Array M (Lower ix) e) => OuterSlice B ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeOuterSlice :: Array B ix e -> Int -> Elt B ix e Source #

class Load r ix e => InnerSlice r ix e Source #

Minimal complete definition

unsafeInnerSlice

Instances
(Elt D ix e ~ Array D (Lower ix) e, Index ix) => InnerSlice D ix e Source # 
Instance details

Defined in Data.Massiv.Array.Delayed.Pull

Methods

unsafeInnerSlice :: Array D ix e -> (Sz (Lower ix), Sz Int) -> Int -> Elt D ix e Source #

(Elt M ix e ~ Array M (Lower ix) e, Index ix, Index (Lower ix)) => InnerSlice M ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Internal

Methods

unsafeInnerSlice :: Array M ix e -> (Sz (Lower ix), Sz Int) -> Int -> Elt M ix e Source #

InnerSlice M Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Internal

Methods

unsafeInnerSlice :: Array M Ix1 e -> (Sz (Lower Ix1), Sz Int) -> Int -> Elt M Ix1 e Source #

(Unbox e, Index ix, Index (Lower ix), Elt U ix e ~ Elt M ix e, Elt M ix e ~ Array M (Lower ix) e) => InnerSlice U ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeInnerSlice :: Array U ix e -> (Sz (Lower ix), Sz Int) -> Int -> Elt U ix e Source #

Unbox e => InnerSlice U Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeInnerSlice :: Array U Ix1 e -> (Sz (Lower Ix1), Sz Int) -> Int -> Elt U Ix1 e Source #

(Prim e, Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt P ix e ~ Array M (Lower ix) e) => InnerSlice P ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeInnerSlice :: Array P ix e -> (Sz (Lower ix), Sz Int) -> Int -> Elt P ix e Source #

Prim e => InnerSlice P Ix1 e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeInnerSlice :: Array P Ix1 e -> (Sz (Lower Ix1), Sz Int) -> Int -> Elt P Ix1 e Source #

(Storable e, Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt S ix e ~ Array M (Lower ix) e) => InnerSlice S ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Storable

Methods

unsafeInnerSlice :: Array S ix e -> (Sz (Lower ix), Sz Int) -> Int -> Elt S ix e Source #

(NFData e, Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt N ix e ~ Array M (Lower ix) e) => InnerSlice N ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeInnerSlice :: Array N ix e -> (Sz (Lower ix), Sz Int) -> Int -> Elt N ix e Source #

(Index ix, Index (Lower ix), Elt M ix e ~ Array M (Lower ix) e, Elt B ix e ~ Array M (Lower ix) e) => InnerSlice B ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeInnerSlice :: Array B ix e -> (Sz (Lower ix), Sz Int) -> Int -> Elt B ix e Source #

class (Load r ix e, Source r ix e) => Manifest r ix e Source #

Manifest arrays are backed by actual memory and values are looked up versus computed as it is with delayed arrays. Because of this fact indexing functions (!), (!?), etc. are constrained to manifest arrays only.

Minimal complete definition

unsafeLinearIndexM

Instances
Index ix => Manifest M ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Internal

Methods

unsafeLinearIndexM :: Array M ix e -> Int -> e Source #

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

Defined in Data.Massiv.Array.Manifest.Unboxed

Methods

unsafeLinearIndexM :: Array U ix e -> Int -> e Source #

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

Defined in Data.Massiv.Array.Manifest.Primitive

Methods

unsafeLinearIndexM :: Array P ix e -> Int -> e Source #

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

Defined in Data.Massiv.Array.Manifest.Storable

Methods

unsafeLinearIndexM :: Array S ix e -> Int -> e Source #

(Index ix, NFData e) => Manifest N ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeLinearIndexM :: Array N ix e -> Int -> e Source #

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

Defined in Data.Massiv.Array.Manifest.Boxed

Methods

unsafeLinearIndexM :: Array B ix e -> Int -> e Source #

class (Construct r ix e, Manifest r ix e) => Mutable r ix e Source #

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

Defined in Data.Massiv.Array.Manifest.Unboxed

Associated Types

data MArray s U ix e :: Type Source #

Methods

msize :: MArray s U ix e -> Sz ix Source #

unsafeThaw :: PrimMonad m => Array U ix e -> m (MArray (PrimState m) U ix e) Source #

unsafeFreeze :: PrimMonad m => Comp -> MArray (PrimState m) U ix e -> m (Array U ix e) Source #

unsafeNew :: PrimMonad m => Sz ix -> m (MArray (PrimState m) U ix e) Source #

unsafeLinearRead :: PrimMonad m => MArray (PrimState m) U ix e -> Int -> m e Source #

unsafeLinearWrite :: PrimMonad m => MArray (PrimState m) U ix e -> Int -> e -> m () Source #

initialize :: PrimMonad m => MArray (PrimState m) U ix e -> m () Source #

initializeNew :: PrimMonad m => Maybe e -> Sz ix -> m (MArray (PrimState m) U ix e) Source #

unsafeLinearSet :: PrimMonad m => MArray (PrimState m) U ix e -> Ix1 -> Sz1 -> e -> m () Source #

unsafeLinearCopy :: (Mutable U ix' e, PrimMonad m) => MArray (PrimState m) U ix' e -> Ix1 -> MArray (PrimState m) U ix e -> Ix1 -> Sz1 -> m () Source #

unsafeArrayLinearCopy :: (Mutable U ix' e, PrimMonad m) => Array U ix' e -> Ix1 -> MArray (PrimState m) U ix e -> Ix1 -> Sz1 -> m () Source #

unsafeLinearShrink :: PrimMonad m => MArray (PrimState m) U ix e -> Sz ix -> m (MArray (PrimState m) U ix e) Source #

unsafeLinearGrow :: PrimMonad m => MArray (PrimState m) U ix e -> Sz ix -> m (MArray (PrimState m) U ix e) Source #

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

Defined in Data.Massiv.Array.Manifest.Primitive

Associated Types

data MArray s P ix e :: Type Source #

Methods

msize :: MArray s P ix e -> Sz ix Source #

unsafeThaw :: PrimMonad m => Array P ix e -> m (MArray (PrimState m) P ix e) Source #

unsafeFreeze :: PrimMonad m => Comp -> MArray (PrimState m) P ix e -> m (Array P ix e) Source #

unsafeNew :: PrimMonad m => Sz ix -> m (MArray (PrimState m) P ix e) Source #

unsafeLinearRead :: PrimMonad m => MArray (PrimState m) P ix e -> Int -> m e Source #

unsafeLinearWrite :: PrimMonad m => MArray (PrimState m) P ix e -> Int -> e -> m () Source #

initialize :: PrimMonad m => MArray (PrimState m) P ix e -> m () Source #

initializeNew :: PrimMonad m => Maybe e -> Sz ix -> m (MArray (PrimState m) P ix e) Source #

unsafeLinearSet :: PrimMonad m => MArray (PrimState m) P ix e -> Ix1 -> Sz1 -> e -> m () Source #

unsafeLinearCopy :: (Mutable P ix' e, PrimMonad m) => MArray (PrimState m) P ix' e -> Ix1 -> MArray (PrimState m) P ix e -> Ix1 -> Sz1 -> m () Source #

unsafeArrayLinearCopy :: (Mutable P ix' e, PrimMonad m) => Array P ix' e -> Ix1 -> MArray (PrimState m) P ix e -> Ix1 -> Sz1 -> m () Source #

unsafeLinearShrink :: PrimMonad m => MArray (PrimState m) P ix e -> Sz ix -> m (MArray (PrimState m) P ix e) Source #

unsafeLinearGrow :: PrimMonad m => MArray (PrimState m) P ix e -> Sz ix -> m (MArray (PrimState m) P ix e) Source #

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

Defined in Data.Massiv.Array.Manifest.Storable

Associated Types

data MArray s S ix e :: Type Source #

Methods

msize :: MArray s S ix e -> Sz ix Source #

unsafeThaw :: PrimMonad m => Array S ix e -> m (MArray (PrimState m) S ix e) Source #

unsafeFreeze :: PrimMonad m => Comp -> MArray (PrimState m) S ix e -> m (Array S ix e) Source #

unsafeNew :: PrimMonad m => Sz ix -> m (MArray (PrimState m) S ix e) Source #

unsafeLinearRead :: PrimMonad m => MArray (PrimState m) S ix e -> Int -> m e Source #

unsafeLinearWrite :: PrimMonad m => MArray (PrimState m) S ix e -> Int -> e -> m () Source #

initialize :: PrimMonad m => MArray (PrimState m) S ix e -> m () Source #

initializeNew :: PrimMonad m => Maybe e -> Sz ix -> m (MArray (PrimState m) S ix e) Source #

unsafeLinearSet :: PrimMonad m => MArray (PrimState m) S ix e -> Ix1 -> Sz1 -> e -> m () Source #

unsafeLinearCopy :: (Mutable S ix' e, PrimMonad m) => MArray (PrimState m) S ix' e -> Ix1 -> MArray (PrimState m) S ix e -> Ix1 -> Sz1 -> m () Source #

unsafeArrayLinearCopy :: (Mutable S ix' e, PrimMonad m) => Array S ix' e -> Ix1 -> MArray (PrimState m) S ix e -> Ix1 -> Sz1 -> m () Source #

unsafeLinearShrink :: PrimMonad m => MArray (PrimState m) S ix e -> Sz ix -> m (MArray (PrimState m) S ix e) Source #

unsafeLinearGrow :: PrimMonad m => MArray (PrimState m) S ix e -> Sz ix -> m (MArray (PrimState m) S ix e) Source #

(Index ix, NFData e) => Mutable N ix e Source # 
Instance details

Defined in Data.Massiv.Array.Manifest.Boxed

Associated Types

data MArray s N ix e :: Type Source #

Methods

msize :: MArray s N ix e -> Sz ix Source #

unsafeThaw :: PrimMonad m => Array N ix e -> m (MArray (PrimState m) N ix e) Source #

unsafeFreeze :: PrimMonad m => Comp -> MArray (PrimState m) N ix e -> m (Array N ix e) Source #

unsafeNew :: PrimMonad m => Sz ix -> m (MArray (PrimState m) N ix e) Source #

unsafeLinearRead :: PrimMonad m => MArray (PrimState m) N ix e -> Int -> m e Source #

unsafeLinearWrite :: PrimMonad m => MArray (PrimState m) N ix e -> Int -> e -> m () Source #

initialize :: PrimMonad m => MArray (PrimState m) N ix e -> m () Source #

initializeNew :: PrimMonad m => Maybe e -> Sz ix -> m (MArray (PrimState m) N ix e) Source #

unsafeLinearSet :: PrimMonad m => MArray (PrimState m) N ix e -> Ix1 -> Sz1 -> e -> m () Source #

unsafeLinearCopy :: (Mutable N ix' e, PrimMonad m) => MArray (PrimState m) N ix' e -> Ix1 -> MArray (PrimState m) N ix e -> Ix1 -> Sz1 -> m () Source #

unsafeArrayLinearCopy :: (Mutable N ix' e, PrimMonad m) => Array N ix' e -> Ix1 -> MArray (PrimState m) N ix e -> Ix1 -> Sz1 -> m () Source #

unsafeLinearShrink :: PrimMonad m => MArray (PrimState m) N ix e -> Sz ix -> m (MArray (PrimState m) N ix e) Source #

unsafeLinearGrow :: PrimMonad m => MArray (PrimState m) N ix e -> Sz ix -> m (MArray (PrimState m) N ix e) Source #

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

Defined in Data.Massiv.Array.Manifest.Boxed

Associated Types

data MArray s B ix e :: Type Source #

Methods

msize :: MArray s B ix e -> Sz ix Source #

unsafeThaw :: PrimMonad m => Array B ix e -> m (MArray (PrimState m) B ix e) Source #

unsafeFreeze :: PrimMonad m => Comp -> MArray (PrimState m) B ix e -> m (Array B ix e) Source #

unsafeNew :: PrimMonad m => Sz ix -> m (MArray (PrimState m) B ix e) Source #

unsafeLinearRead :: PrimMonad m => MArray (PrimState m) B ix e -> Int -> m e Source #

unsafeLinearWrite :: PrimMonad m => MArray (PrimState m) B ix e -> Int -> e -> m () Source #

initialize :: PrimMonad m => MArray (PrimState m) B ix e -> m () Source #

initializeNew :: PrimMonad m => Maybe e -> Sz ix -> m (MArray (PrimState m) B ix e) Source #

unsafeLinearSet :: PrimMonad m => MArray (PrimState m) B ix e -> Ix1 -> Sz1 -> e -> m () Source #

unsafeLinearCopy :: (Mutable B ix' e, PrimMonad m) => MArray (PrimState m) B ix' e -> Ix1 -> MArray (PrimState m) B ix e -> Ix1 -> Sz1 -> m () Source #

unsafeArrayLinearCopy :: (Mutable B ix' e, PrimMonad m) => Array B ix' e -> Ix1 -> MArray (PrimState m) B ix e -> Ix1 -> Sz1 -> m () Source #

unsafeLinearShrink :: PrimMonad m => MArray (PrimState m) B ix e -> Sz ix -> m (MArray (PrimState m) B ix e) Source #

unsafeLinearGrow :: PrimMonad m => MArray (PrimState m) B ix e -> Sz ix -> m (MArray (PrimState m) B ix e) Source #

class Construct r ix e => Ragged r ix e Source #

Minimal complete definition

emptyR, isNull, consR, unconsR, generateRaggedM, edgeSize, flattenRagged, loadRagged, raggedFormat

Instances
(Index ix, Index (Lower ix), Ragged L (Lower ix) e, Elt L ix e ~ Array L (Lower ix) e, Elt LN ix e ~ Array LN (Lower ix) e, Coercible (Elt LN ix e) [Elt LN (Lower ix) e]) => Ragged L ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

emptyR :: Comp -> Array L ix e

isNull :: Array L ix e -> Bool

consR :: Elt L ix e -> Array L ix e -> Array L ix e

unconsR :: Array L ix e -> Maybe (Elt L ix e, Array L ix e)

generateRaggedM :: Monad m => Comp -> Sz ix -> (ix -> m e) -> m (Array L ix e)

edgeSize :: Array L ix e -> Sz ix

flattenRagged :: Array L ix e -> Array L Ix1 e

loadRagged :: Monad m => (m () -> m ()) -> (Int -> e -> m a) -> Int -> Int -> Sz ix -> Array L ix e -> m ()

raggedFormat :: (e -> String) -> String -> Array L ix e -> String

Ragged L Ix1 e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

emptyR :: Comp -> Array L Ix1 e

isNull :: Array L Ix1 e -> Bool

consR :: Elt L Ix1 e -> Array L Ix1 e -> Array L Ix1 e

unconsR :: Array L Ix1 e -> Maybe (Elt L Ix1 e, Array L Ix1 e)

generateRaggedM :: Monad m => Comp -> Sz Ix1 -> (Ix1 -> m e) -> m (Array L Ix1 e)

edgeSize :: Array L Ix1 e -> Sz Ix1

flattenRagged :: Array L Ix1 e -> Array L Ix1 e

loadRagged :: Monad m => (m () -> m ()) -> (Int -> e -> m a) -> Int -> Int -> Sz Ix1 -> Array L Ix1 e -> m ()

raggedFormat :: (e -> String) -> String -> Array L Ix1 e -> String

class Nested r ix e where Source #

Methods

fromNested :: NestedStruct r ix e -> Array r ix e Source #

toNested :: Array r ix e -> NestedStruct r ix e Source #

Instances
Nested L ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

fromNested :: NestedStruct L ix e -> Array L ix e Source #

toNested :: Array L ix e -> NestedStruct L ix e Source #

(Elt LN ix e ~ Array LN (Lower ix) e, ListItem ix e ~ [ListItem (Lower ix) e], Coercible (Elt LN ix e) (ListItem ix e)) => Nested LN ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

fromNested :: NestedStruct LN ix e -> Array LN ix e Source #

toNested :: Array LN ix e -> NestedStruct LN ix e Source #

Nested LN Ix1 e Source # 
Instance details

Defined in Data.Massiv.Core.List

type family NestedStruct r ix e :: * Source #

Instances
type NestedStruct L ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

type NestedStruct L ix e = Array LN ix e
type NestedStruct LN ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

type NestedStruct LN ix e = [ListItem ix e]

data L Source #

Constructors

L 
Instances
(Index ix, Index (Lower ix), Ragged L (Lower ix) e, Elt L ix e ~ Array L (Lower ix) e, Elt LN ix e ~ Array LN (Lower ix) e, Coercible (Elt LN ix e) [Elt LN (Lower ix) e]) => Ragged L ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

emptyR :: Comp -> Array L ix e

isNull :: Array L ix e -> Bool

consR :: Elt L ix e -> Array L ix e -> Array L ix e

unconsR :: Array L ix e -> Maybe (Elt L ix e, Array L ix e)

generateRaggedM :: Monad m => Comp -> Sz ix -> (ix -> m e) -> m (Array L ix e)

edgeSize :: Array L ix e -> Sz ix

flattenRagged :: Array L ix e -> Array L Ix1 e

loadRagged :: Monad m => (m () -> m ()) -> (Int -> e -> m a) -> Int -> Int -> Sz ix -> Array L ix e -> m ()

raggedFormat :: (e -> String) -> String -> Array L ix e -> String

Ragged L Ix1 e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

emptyR :: Comp -> Array L Ix1 e

isNull :: Array L Ix1 e -> Bool

consR :: Elt L Ix1 e -> Array L Ix1 e -> Array L Ix1 e

unconsR :: Array L Ix1 e -> Maybe (Elt L Ix1 e, Array L Ix1 e)

generateRaggedM :: Monad m => Comp -> Sz Ix1 -> (Ix1 -> m e) -> m (Array L Ix1 e)

edgeSize :: Array L Ix1 e -> Sz Ix1

flattenRagged :: Array L Ix1 e -> Array L Ix1 e

loadRagged :: Monad m => (m () -> m ()) -> (Int -> e -> m a) -> Int -> Int -> Sz Ix1 -> Array L Ix1 e -> m ()

raggedFormat :: (e -> String) -> String -> Array L Ix1 e -> String

Nested L ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

fromNested :: NestedStruct L ix e -> Array L ix e Source #

toNested :: Array L ix e -> NestedStruct L ix e Source #

Ragged L ix e => OuterSlice L ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

unsafeOuterSlice :: Array L ix e -> Int -> Elt L ix e Source #

OuterSlice L Ix1 e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

unsafeOuterSlice :: Array L Ix1 e -> Int -> Elt L Ix1 e Source #

(Index ix, Ragged L ix e) => Load L ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

Associated Types

type R L :: Type Source #

Methods

getComp :: Array L ix e -> Comp Source #

size :: Array L ix e -> Sz ix Source #

loadArrayM :: Monad m => Scheduler m () -> Array L ix e -> (Int -> e -> m ()) -> m () Source #

defaultElement :: Array L ix e -> Maybe e Source #

maxSize :: Array L ix e -> Maybe (Sz ix) Source #

isEmpty :: Array L ix e -> Bool Source #

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array L ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array L ix e -> m (MArray RealWorld r' ix e)

(Index ix, Ragged L ix e, Ragged L (Lower ix) e, Elt L ix e ~ Array L (Lower ix) e) => Construct L ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

setComp :: Comp -> Array L ix e -> Array L ix e Source #

makeArray :: Comp -> Sz ix -> (ix -> e) -> Array L ix e Source #

makeArrayLinear :: Comp -> Sz ix -> (Int -> e) -> Array L ix e Source #

Construct L Ix1 e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

setComp :: Comp -> Array L Ix1 e -> Array L Ix1 e Source #

makeArray :: Comp -> Sz Ix1 -> (Ix1 -> e) -> Array L Ix1 e Source #

makeArrayLinear :: Comp -> Sz Ix1 -> (Int -> e) -> Array L Ix1 e Source #

Stream L Ix1 e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

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

toStreamIx :: Array L Ix1 e -> Steps Id (Ix1, e) Source #

Nested LN ix e => IsList (Array L ix e) Source # 
Instance details

Defined in Data.Massiv.Core.List

Associated Types

type Item (Array L ix e) :: Type #

Methods

fromList :: [Item (Array L ix e)] -> Array L ix e #

fromListN :: Int -> [Item (Array L ix e)] -> Array L ix e #

toList :: Array L ix e -> [Item (Array L ix e)] #

(Ragged L ix e, Show e) => Show (Array L ix e) Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

showsPrec :: Int -> Array L ix e -> ShowS #

show :: Array L ix e -> String #

showList :: [Array L ix e] -> ShowS #

type R L Source # 
Instance details

Defined in Data.Massiv.Core.List

type R L = L
data Array L ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

data Array L ix e = LArray {}
type NestedStruct L ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

type NestedStruct L ix e = Array LN ix e
type Item (Array L ix e) Source # 
Instance details

Defined in Data.Massiv.Core.List

type Item (Array L ix e) = ListItem ix e

data LN Source #

Instances
(Elt LN ix e ~ Array LN (Lower ix) e, ListItem ix e ~ [ListItem (Lower ix) e], Coercible (Elt LN ix e) (ListItem ix e)) => Nested LN ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

fromNested :: NestedStruct LN ix e -> Array LN ix e Source #

toNested :: Array LN ix e -> NestedStruct LN ix e Source #

Nested LN Ix1 e Source # 
Instance details

Defined in Data.Massiv.Core.List

(Index ix, Load L ix e, Ragged L ix e) => Load LN ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

Associated Types

type R LN :: Type Source #

Methods

getComp :: Array LN ix e -> Comp Source #

size :: Array LN ix e -> Sz ix Source #

loadArrayM :: Monad m => Scheduler m () -> Array LN ix e -> (Int -> e -> m ()) -> m () Source #

defaultElement :: Array LN ix e -> Maybe e Source #

maxSize :: Array LN ix e -> Maybe (Sz ix) Source #

isEmpty :: Array LN ix e -> Bool Source #

unsafeLoadIntoS :: (Mutable r' ix e, PrimMonad m) => MArray (PrimState m) r' ix e -> Array LN ix e -> m (MArray (PrimState m) r' ix e)

unsafeLoadInto :: (Mutable r' ix e, MonadIO m) => MArray RealWorld r' ix e -> Array LN ix e -> m (MArray RealWorld r' ix e)

Construct LN Ix1 e Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

setComp :: Comp -> Array LN Ix1 e -> Array LN Ix1 e Source #

makeArray :: Comp -> Sz Ix1 -> (Ix1 -> e) -> Array LN Ix1 e Source #

makeArrayLinear :: Comp -> Sz Ix1 -> (Int -> e) -> Array LN Ix1 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 #

toStreamIx :: Array LN Ix1 e -> Steps Id (Ix1, e) Source #

Nested LN ix e => IsList (Array LN ix e) Source # 
Instance details

Defined in Data.Massiv.Core.List

Associated Types

type Item (Array LN ix e) :: Type #

Methods

fromList :: [Item (Array LN ix e)] -> Array LN ix e #

fromListN :: Int -> [Item (Array LN ix e)] -> Array LN ix e #

toList :: Array LN ix e -> [Item (Array LN ix e)] #

(Ragged L ix e, Show e) => Show (Array LN ix e) Source # 
Instance details

Defined in Data.Massiv.Core.List

Methods

showsPrec :: Int -> Array LN ix e -> ShowS #

show :: Array LN ix e -> String #

showList :: [Array LN ix e] -> ShowS #

type R LN Source # 
Instance details

Defined in Data.Massiv.Core.List

type R LN = LN
newtype Array LN ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

newtype Array LN ix e = List {}
type NestedStruct LN ix e Source # 
Instance details

Defined in Data.Massiv.Core.List

type NestedStruct LN ix e = [ListItem ix e]
type Item (Array LN ix e) Source # 
Instance details

Defined in Data.Massiv.Core.List

type Item (Array LN ix e) = ListItem ix e

type family ListItem ix e :: * where ... Source #

Equations

ListItem Ix1 e = e 
ListItem ix e = [ListItem (Lower ix) e] 

data Comp #

Computation strategy to use when scheduling work.

Constructors

Seq

Sequential computation

ParOn ![Int]

Schedule workers to run on specific capabilities. Specifying an empty list ParOn [] or using Par will result in utilization of all available capabilities.

ParN !Word16

Specify the number of workers that will be handling all the jobs. Difference from ParOn is that workers can jump between cores. Using ParN 0 will result in using all available capabilities.

Bundled Patterns

pattern Par :: Comp

Parallel computation using all available cores. Same as ParOn []

Since: scheduler-1.0.0

pattern Par' :: Comp

Parallel computation using all available cores. Same as ParN 0

Since: scheduler-1.1.0

Instances
Eq Comp 
Instance details

Defined in Control.Scheduler.Computation

Methods

(==) :: Comp -> Comp -> Bool #

(/=) :: Comp -> Comp -> Bool #

Show Comp 
Instance details

Defined in Control.Scheduler.Computation

Methods

showsPrec :: Int -> Comp -> ShowS #

show :: Comp -> String #

showList :: [Comp] -> ShowS #

Semigroup Comp 
Instance details

Defined in Control.Scheduler.Computation

Methods

(<>) :: Comp -> Comp -> Comp #

sconcat :: NonEmpty Comp -> Comp #

stimes :: Integral b => b -> Comp -> Comp #

Monoid Comp 
Instance details

Defined in Control.Scheduler.Computation

Methods

mempty :: Comp #

mappend :: Comp -> Comp -> Comp #

mconcat :: [Comp] -> Comp #

NFData Comp 
Instance details

Defined in Control.Scheduler.Computation

Methods

rnf :: Comp -> () #

data WorkerStates s #

Each worker is capable of keeping it's own state, that can be share for different schedulers, but not at the same time. In other words using the same WorkerStates on withSchedulerS concurrently will result in an error. Can be initialized with initWorkerStates

Since: scheduler-1.4.0

initWorkerStates :: MonadIO m => Comp -> (WorkerId -> m s) -> m (WorkerStates s) #

Initialize a separate state for each worker.

Since: scheduler-1.4.0

Exceptions

class Monad m => MonadThrow (m :: Type -> Type) where #

A class for monads in which exceptions may be thrown.

Instances should obey the following law:

throwM e >> x = throwM e

In other words, throwing an exception short-circuits the rest of the monadic computation.

Methods

throwM :: Exception e => e -> m a #

Throw an exception. Note that this throws when this action is run in the monad m, not when it is applied. It is a generalization of Control.Exception's throwIO.

Should satisfy the law:

throwM e >> f = throwM e
Instances
MonadThrow [] 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> [a] #

MonadThrow Maybe 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> Maybe a #

MonadThrow IO 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> IO a #

MonadThrow Q 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> Q a #

MonadThrow STM 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> STM a #

e ~ SomeException => MonadThrow (Either e) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e0 => e0 -> Either e a #

MonadThrow (ST s) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> ST s a #

MonadThrow m => MonadThrow (MaybeT m)

Throws exceptions into the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> MaybeT m a #

MonadThrow m => MonadThrow (ListT m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> ListT m a #

MonadThrow m => MonadThrow (ExceptT e m)

Throws exceptions into the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e0 => e0 -> ExceptT e m a #

MonadThrow m => MonadThrow (IdentityT m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> IdentityT m a #

(Error e, MonadThrow m) => MonadThrow (ErrorT e m)

Throws exceptions into the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e0 => e0 -> ErrorT e m a #

MonadThrow m => MonadThrow (StateT s m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> StateT s m a #

MonadThrow m => MonadThrow (StateT s m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> StateT s m a #

(MonadThrow m, Monoid w) => MonadThrow (WriterT w m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> WriterT w m a #

(MonadThrow m, Monoid w) => MonadThrow (WriterT w m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> WriterT w m a #

MonadThrow m => MonadThrow (ContT r m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> ContT r m a #

MonadThrow m => MonadThrow (ReaderT r m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> ReaderT r m a #

(MonadThrow m, Monoid w) => MonadThrow (RWST r w s m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> RWST r w s m a #

(MonadThrow m, Monoid w) => MonadThrow (RWST r w s m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> RWST r w s m a #

throw :: Exception e => e -> a #

Throw an exception. Exceptions may be thrown from purely functional code, but may only be caught within the IO monad.

class (Typeable e, Show e) => Exception e where #

Any type that you wish to throw or catch as an exception must be an instance of the Exception class. The simplest case is a new exception type directly below the root:

data MyException = ThisException | ThatException
    deriving Show

instance Exception MyException

The default method definitions in the Exception class do what we need in this case. You can now throw and catch ThisException and ThatException as exceptions:

*Main> throw ThisException `catch` \e -> putStrLn ("Caught " ++ show (e :: MyException))
Caught ThisException

In more complicated examples, you may wish to define a whole hierarchy of exceptions:

---------------------------------------------------------------------
-- Make the root exception type for all the exceptions in a compiler

data SomeCompilerException = forall e . Exception e => SomeCompilerException e

instance Show SomeCompilerException where
    show (SomeCompilerException e) = show e

instance Exception SomeCompilerException

compilerExceptionToException :: Exception e => e -> SomeException
compilerExceptionToException = toException . SomeCompilerException

compilerExceptionFromException :: Exception e => SomeException -> Maybe e
compilerExceptionFromException x = do
    SomeCompilerException a <- fromException x
    cast a

---------------------------------------------------------------------
-- Make a subhierarchy for exceptions in the frontend of the compiler

data SomeFrontendException = forall e . Exception e => SomeFrontendException e

instance Show SomeFrontendException where
    show (SomeFrontendException e) = show e

instance Exception SomeFrontendException where
    toException = compilerExceptionToException
    fromException = compilerExceptionFromException

frontendExceptionToException :: Exception e => e -> SomeException
frontendExceptionToException = toException . SomeFrontendException

frontendExceptionFromException :: Exception e => SomeException -> Maybe e
frontendExceptionFromException x = do
    SomeFrontendException a <- fromException x
    cast a

---------------------------------------------------------------------
-- Make an exception type for a particular frontend compiler exception

data MismatchedParentheses = MismatchedParentheses
    deriving Show

instance Exception MismatchedParentheses where
    toException   = frontendExceptionToException
    fromException = frontendExceptionFromException

We can now catch a MismatchedParentheses exception as MismatchedParentheses, SomeFrontendException or SomeCompilerException, but not other types, e.g. IOException:

*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: MismatchedParentheses))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeFrontendException))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeCompilerException))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: IOException))
*** Exception: MismatchedParentheses

Minimal complete definition

Nothing

Methods

toException :: e -> SomeException #

fromException :: SomeException -> Maybe e #

displayException :: e -> String #

Render this exception value in a human-friendly manner.

Default implementation: show.

Since: base-4.8.0.0

Instances
Exception Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Exception PatternMatchFail

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception RecSelError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception RecConError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception RecUpdError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception NoMethodError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception TypeError

Since: base-4.9.0.0

Instance details

Defined in Control.Exception.Base

Exception NonTermination

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception NestedAtomically

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception BlockedIndefinitelyOnMVar

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception BlockedIndefinitelyOnSTM

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception Deadlock

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception AllocationLimitExceeded

Since: base-4.8.0.0

Instance details

Defined in GHC.IO.Exception

Exception CompactionFailed

Since: base-4.10.0.0

Instance details

Defined in GHC.IO.Exception

Exception AssertionFailed

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception SomeAsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Exception AsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Exception ArrayException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception FixIOException

Since: base-4.11.0.0

Instance details

Defined in GHC.IO.Exception

Exception ExitCode

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception ErrorCall

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception

Exception ArithException

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception.Type

Exception SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Exception WorkerTerminateException 
Instance details

Defined in Control.Scheduler.Internal

Methods

toException :: WorkerTerminateException -> SomeException #

fromException :: SomeException -> Maybe WorkerTerminateException #

displayException :: WorkerTerminateException -> String #

Exception WorkerException 
Instance details

Defined in Control.Scheduler.Internal

Methods

toException :: WorkerException -> SomeException #

fromException :: SomeException -> Maybe WorkerException #

displayException :: WorkerException -> String #

Exception MutexException 
Instance details

Defined in Control.Scheduler.Internal

Exception ShapeException Source # 
Instance details

Defined in Data.Massiv.Core.Index.Internal

Exception SizeException Source # 
Instance details

Defined in Data.Massiv.Core.Index.Internal

Exception IndexException Source # 
Instance details

Defined in Data.Massiv.Core.Index.Internal

Exception Uninitialized Source # 
Instance details

Defined in Data.Massiv.Core.Exception

Exception ImpossibleException Source # 
Instance details

Defined in Data.Massiv.Core.Exception

data SomeException #

The SomeException type is the root of the exception type hierarchy. When an exception of type e is thrown, behind the scenes it is encapsulated in a SomeException.

data IndexException where Source #

Exceptions that get thrown when there is a problem with an index, size or dimension.

Since: 0.3.0

Constructors

IndexZeroException :: Index ix => !ix -> IndexException

Index contains a zero value along one of the dimensions.

IndexDimensionException :: (NFData ix, Show ix, Typeable ix) => !ix -> !Dim -> IndexException

Dimension is out of reach.

IndexOutOfBoundsException :: Index ix => !(Sz ix) -> !ix -> IndexException

Index is out of bounds.

data SizeException where Source #

Exception that indicates an issue with an array size.

Since: 0.3.0

Constructors

SizeMismatchException :: Index ix => !(Sz ix) -> !(Sz ix) -> SizeException

Two sizes are expected to be equal along some or all dimensions, but they are not.

SizeElementsMismatchException :: (Index ix, Index ix') => !(Sz ix) -> !(Sz ix') -> SizeException

Total number of elements does not match between the two sizes.

SizeSubregionException :: Index ix => !(Sz ix) -> !ix -> !(Sz ix) -> SizeException

Described subregion is too big for the specified size.

SizeEmptyException :: Index ix => !(Sz ix) -> SizeException

An array with the size cannot contain any elements.

data ShapeException Source #

Exception that can happen upon conversion of a ragged type array into the rectangular kind. Which means conversion from lists is susceptible to this exception.

Since: 0.3.0

data Uninitialized Source #

An error that gets thrown when an unitialized element of a boxed array gets accessed. Can only happen when array was constructed with unsafeNew.

Constructors

Uninitialized 

guardNumberOfElements :: (MonadThrow m, Index ix, Index ix') => Sz ix -> Sz ix' -> m () Source #

Throw SizeElementsMismatchException whenever number of elements in both sizes do not match.

Since: 0.3.5

Stateful Monads

class MonadIO m => MonadUnliftIO (m :: Type -> Type) #

Monads which allow their actions to be run in IO.

While MonadIO allows an IO action to be lifted into another monad, this class captures the opposite concept: allowing you to capture the monadic context. Note that, in order to meet the laws given below, the intuition is that a monad must have no monadic state, but may have monadic context. This essentially limits MonadUnliftIO to ReaderT and IdentityT transformers on top of IO.

Laws. For any value u returned by askUnliftIO, it must meet the monad transformer laws as reformulated for MonadUnliftIO:

  • unliftIO u . return = return
  • unliftIO u (m >>= f) = unliftIO u m >>= unliftIO u . f

Instances of MonadUnliftIO must also satisfy the idempotency law:

  • askUnliftIO >>= \u -> (liftIO . unliftIO u) m = m

This law showcases two properties. First, askUnliftIO doesn't change the monadic context, and second, liftIO . unliftIO u is equivalent to id IF called in the same monadic context as askUnliftIO.

Since: unliftio-core-0.1.0.0

Minimal complete definition

withRunInIO

Instances
MonadUnliftIO IO 
Instance details

Defined in Control.Monad.IO.Unlift

Methods

withRunInIO :: ((forall a. IO a -> IO a) -> IO b) -> IO b #

MonadUnliftIO m => MonadUnliftIO (IdentityT m) 
Instance details

Defined in Control.Monad.IO.Unlift

Methods

withRunInIO :: ((forall a. IdentityT m a -> IO a) -> IO b) -> IdentityT m b #

MonadUnliftIO m => MonadUnliftIO (ReaderT r m) 
Instance details

Defined in Control.Monad.IO.Unlift

Methods

withRunInIO :: ((forall a. ReaderT r m a -> IO a) -> IO b) -> ReaderT r m b #

class Monad m => MonadIO (m :: Type -> Type) where #

Monads in which IO computations may be embedded. Any monad built by applying a sequence of monad transformers to the IO monad will be an instance of this class.

Instances should satisfy the following laws, which state that liftIO is a transformer of monads:

Methods

liftIO :: IO a -> m a #

Lift a computation from the IO monad.

Instances
MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

Methods

liftIO :: IO a -> IO a #

MonadIO Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

liftIO :: IO a -> Q a #

MonadIO m => MonadIO (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftIO :: IO a -> MaybeT m a #

MonadIO m => MonadIO (ListT m) 
Instance details

Defined in Control.Monad.Trans.List

Methods

liftIO :: IO a -> ListT m a #

MonadIO m => MonadIO (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftIO :: IO a -> ExceptT e m a #

MonadIO m => MonadIO (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftIO :: IO a -> IdentityT m a #

(Error e, MonadIO m) => MonadIO (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

liftIO :: IO a -> ErrorT e m a #

MonadIO m => MonadIO (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

liftIO :: IO a -> StateT s m a #

MonadIO m => MonadIO (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

liftIO :: IO a -> StateT s m a #

(Monoid w, MonadIO m) => MonadIO (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

liftIO :: IO a -> WriterT w m a #

(Monoid w, MonadIO m) => MonadIO (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

liftIO :: IO a -> WriterT w m a #

(Monoid w, Functor m, MonadIO m) => MonadIO (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

liftIO :: IO a -> AccumT w m a #

MonadIO m => MonadIO (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

liftIO :: IO a -> SelectT r m a #

MonadIO m => MonadIO (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

liftIO :: IO a -> ContT r m a #

MonadIO m => MonadIO (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

liftIO :: IO a -> ReaderT r m a #

(Monoid w, MonadIO m) => MonadIO (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

liftIO :: IO a -> RWST r w s m a #

(Monoid w, MonadIO m) => MonadIO (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

liftIO :: IO a -> RWST r w s m a #

class Monad m => PrimMonad (m :: Type -> Type) #

Class of monads which can perform primitive state-transformer actions

Minimal complete definition

primitive

Associated Types

type PrimState (m :: Type -> Type) :: Type #

State token type

Instances
PrimMonad IO 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState IO :: Type #

Methods

primitive :: (State# (PrimState IO) -> (#State# (PrimState IO), a#)) -> IO a #

PrimMonad (ST s) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ST s) :: Type #

Methods

primitive :: (State# (PrimState (ST s)) -> (#State# (PrimState (ST s)), a#)) -> ST s a #

PrimMonad m => PrimMonad (MaybeT m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (MaybeT m) :: Type #

Methods

primitive :: (State# (PrimState (MaybeT m)) -> (#State# (PrimState (MaybeT m)), a#)) -> MaybeT m a #

PrimMonad m => PrimMonad (ListT m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ListT m) :: Type #

Methods

primitive :: (State# (PrimState (ListT m)) -> (#State# (PrimState (ListT m)), a#)) -> ListT m a #

PrimMonad m => PrimMonad (ExceptT e m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ExceptT e m) :: Type #

Methods

primitive :: (State# (PrimState (ExceptT e m)) -> (#State# (PrimState (ExceptT e m)), a#)) -> ExceptT e m a #

PrimMonad m => PrimMonad (IdentityT m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (IdentityT m) :: Type #

Methods

primitive :: (State# (PrimState (IdentityT m)) -> (#State# (PrimState (IdentityT m)), a#)) -> IdentityT m a #

(Error e, PrimMonad m) => PrimMonad (ErrorT e m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ErrorT e m) :: Type #

Methods

primitive :: (State# (PrimState (ErrorT e m)) -> (#State# (PrimState (ErrorT e m)), a#)) -> ErrorT e m a #

PrimMonad m => PrimMonad (StateT s m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (StateT s m) :: Type #

Methods

primitive :: (State# (PrimState (StateT s m)) -> (#State# (PrimState (StateT s m)), a#)) -> StateT s m a #

PrimMonad m => PrimMonad (StateT s m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (StateT s m) :: Type #

Methods

primitive :: (State# (PrimState (StateT s m)) -> (#State# (PrimState (StateT s m)), a#)) -> StateT s m a #

(Monoid w, PrimMonad m) => PrimMonad (WriterT w m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (WriterT w m) :: Type #

Methods

primitive :: (State# (PrimState (WriterT w m)) -> (#State# (PrimState (WriterT w m)), a#)) -> WriterT w m a #

(Monoid w, PrimMonad m) => PrimMonad (WriterT w m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (WriterT w m) :: Type #

Methods

primitive :: (State# (PrimState (WriterT w m)) -> (#State# (PrimState (WriterT w m)), a#)) -> WriterT w m a #

(Monoid w, PrimMonad m) => PrimMonad (AccumT w m)

Since: primitive-0.6.3.0

Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (AccumT w m) :: Type #

Methods

primitive :: (State# (PrimState (AccumT w m)) -> (#State# (PrimState (AccumT w m)), a#)) -> AccumT w m a #

PrimMonad m => PrimMonad (SelectT r m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (SelectT r m) :: Type #

Methods

primitive :: (State# (PrimState (SelectT r m)) -> (#State# (PrimState (SelectT r m)), a#)) -> SelectT r m a #

PrimMonad m => PrimMonad (ContT r m)

Since: primitive-0.6.3.0

Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ContT r m) :: Type #

Methods

primitive :: (State# (PrimState (ContT r m)) -> (#State# (PrimState (ContT r m)), a#)) -> ContT r m a #

PrimMonad m => PrimMonad (ReaderT r m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ReaderT r m) :: Type #

Methods

primitive :: (State# (PrimState (ReaderT r m)) -> (#State# (PrimState (ReaderT r m)), a#)) -> ReaderT r m a #

(Monoid w, PrimMonad m) => PrimMonad (RWST r w s m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (RWST r w s m) :: Type #

Methods

primitive :: (State# (PrimState (RWST r w s m)) -> (#State# (PrimState (RWST r w s m)), a#)) -> RWST r w s m a #

(Monoid w, PrimMonad m) => PrimMonad (RWST r w s m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (RWST r w s m) :: Type #

Methods

primitive :: (State# (PrimState (RWST r w s m)) -> (#State# (PrimState (RWST r w s m)), a#)) -> RWST r w s m a #