ox-arrays-0.1.0.0: An efficient CPU-based multidimensional array (tensor) library
Safe HaskellNone
LanguageHaskell2010

Data.Array.Nested

Synopsis

Ranked arrays

newtype Ranked (n :: Nat) a Source #

A rank-typed array: the number of dimensions of the array (its rank) is represented on the type level as a Nat.

Valid elements of a ranked arrays are described by the Elt type class. Because Ranked itself is also an instance of Elt, nested arrays are supported (and are represented as a single, flattened, struct-of-arrays array internally).

Ranked is a newtype around a Mixed of Nothings.

Constructors

Ranked (Mixed (Replicate n ('Nothing :: Maybe Nat)) a) 

Instances

Instances details
(FloatElt a, PrimElt a) => Floating (Ranked n a) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

Methods

pi :: Ranked n a #

exp :: Ranked n a -> Ranked n a #

log :: Ranked n a -> Ranked n a #

sqrt :: Ranked n a -> Ranked n a #

(**) :: Ranked n a -> Ranked n a -> Ranked n a #

logBase :: Ranked n a -> Ranked n a -> Ranked n a #

sin :: Ranked n a -> Ranked n a #

cos :: Ranked n a -> Ranked n a #

tan :: Ranked n a -> Ranked n a #

asin :: Ranked n a -> Ranked n a #

acos :: Ranked n a -> Ranked n a #

atan :: Ranked n a -> Ranked n a #

sinh :: Ranked n a -> Ranked n a #

cosh :: Ranked n a -> Ranked n a #

tanh :: Ranked n a -> Ranked n a #

asinh :: Ranked n a -> Ranked n a #

acosh :: Ranked n a -> Ranked n a #

atanh :: Ranked n a -> Ranked n a #

log1p :: Ranked n a -> Ranked n a #

expm1 :: Ranked n a -> Ranked n a #

log1pexp :: Ranked n a -> Ranked n a #

log1mexp :: Ranked n a -> Ranked n a #

Generic (Mixed sh (Ranked n a)) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

Associated Types

type Rep (Mixed sh (Ranked n a)) 
Instance details

Defined in Data.Array.Nested.Ranked.Base

type Rep (Mixed sh (Ranked n a)) = D1 ('MetaData "Mixed" "Data.Array.Nested.Ranked.Base" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Ranked" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Mixed (Replicate n ('Nothing :: Maybe Nat)) a)))))

Methods

from :: Mixed sh (Ranked n a) -> Rep (Mixed sh (Ranked n a)) x #

to :: Rep (Mixed sh (Ranked n a)) x -> Mixed sh (Ranked n a) #

(NumElt a, PrimElt a) => Num (Ranked n a) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

Methods

(+) :: Ranked n a -> Ranked n a -> Ranked n a #

(-) :: Ranked n a -> Ranked n a -> Ranked n a #

(*) :: Ranked n a -> Ranked n a -> Ranked n a #

negate :: Ranked n a -> Ranked n a #

abs :: Ranked n a -> Ranked n a #

signum :: Ranked n a -> Ranked n a #

fromInteger :: Integer -> Ranked n a #

(FloatElt a, PrimElt a) => Fractional (Ranked n a) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

Methods

(/) :: Ranked n a -> Ranked n a -> Ranked n a #

recip :: Ranked n a -> Ranked n a #

fromRational :: Rational -> Ranked n a #

(Show a, Elt a) => Show (Ranked n a) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

Methods

showsPrec :: Int -> Ranked n a -> ShowS #

show :: Ranked n a -> String #

showList :: [Ranked n a] -> ShowS #

Elt a => NFData (Ranked n a) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

Methods

rnf :: Ranked n a -> () #

Eq (Mixed sh (Mixed (Replicate n ('Nothing :: Maybe Nat)) a)) => Eq (Mixed sh (Ranked n a)) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

Methods

(==) :: Mixed sh (Ranked n a) -> Mixed sh (Ranked n a) -> Bool #

(/=) :: Mixed sh (Ranked n a) -> Mixed sh (Ranked n a) -> Bool #

Eq (Mixed (Replicate n ('Nothing :: Maybe Nat)) a) => Eq (Ranked n a) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

Methods

(==) :: Ranked n a -> Ranked n a -> Bool #

(/=) :: Ranked n a -> Ranked n a -> Bool #

Ord (Mixed (Replicate n ('Nothing :: Maybe Nat)) a) => Ord (Ranked n a) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

Methods

compare :: Ranked n a -> Ranked n a -> Ordering #

(<) :: Ranked n a -> Ranked n a -> Bool #

(<=) :: Ranked n a -> Ranked n a -> Bool #

(>) :: Ranked n a -> Ranked n a -> Bool #

(>=) :: Ranked n a -> Ranked n a -> Bool #

max :: Ranked n a -> Ranked n a -> Ranked n a #

min :: Ranked n a -> Ranked n a -> Ranked n a #

Elt a => Elt (Ranked n a) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

Associated Types

type ShapeTree (Ranked n a) 
Instance details

Defined in Data.Array.Nested.Ranked.Base

type ShapeTree (Ranked n a) = (IShR n, ShapeTree a)

Methods

mshape :: forall (sh :: [Maybe Nat]). Mixed sh (Ranked n a) -> IShX sh Source #

mindex :: forall (sh :: [Maybe Nat]). Mixed sh (Ranked n a) -> IIxX sh -> Ranked n a Source #

mindexPartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]). Mixed (sh ++ sh') (Ranked n a) -> IIxX sh -> Mixed sh' (Ranked n a) Source #

mscalar :: Ranked n a -> Mixed ('[] :: [Maybe Nat]) (Ranked n a) Source #

mfromListOuter :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed sh (Ranked n a)) -> Mixed (('Nothing :: Maybe Nat) ': sh) (Ranked n a) Source #

mtoListOuter :: forall (n0 :: Maybe Nat) (sh :: [Maybe Nat]). Mixed (n0 ': sh) (Ranked n a) -> [Mixed sh (Ranked n a)] Source #

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b) -> Mixed sh1 (Ranked n a) -> Mixed sh2 (Ranked n a) Source #

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). StaticShX sh3 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b -> XArray (sh3 ++ sh') b) -> Mixed sh1 (Ranked n a) -> Mixed sh2 (Ranked n a) -> Mixed sh3 (Ranked n a) Source #

mliftL :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> NonEmpty (XArray (sh1 ++ sh') b) -> NonEmpty (XArray (sh2 ++ sh') b)) -> NonEmpty (Mixed sh1 (Ranked n a)) -> NonEmpty (Mixed sh2 (Ranked n a)) Source #

mcastPartial :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh' :: [Maybe Nat]). Rank sh1 ~ Rank sh2 => StaticShX sh1 -> StaticShX sh2 -> Proxy sh' -> Mixed (sh1 ++ sh') (Ranked n a) -> Mixed (sh2 ++ sh') (Ranked n a) Source #

mtranspose :: forall (is :: [Natural]) (sh :: [Maybe Nat]). (IsPermutation is, Rank is <= Rank sh) => Perm is -> Mixed sh (Ranked n a) -> Mixed (PermutePrefix is sh) (Ranked n a) Source #

mconcat :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh) (Ranked n a)) -> Mixed (('Nothing :: Maybe Nat) ': sh) (Ranked n a) Source #

mrnf :: forall (sh :: [Maybe Nat]). Mixed sh (Ranked n a) -> () Source #

mshapeTree :: Ranked n a -> ShapeTree (Ranked n a) Source #

mshapeTreeEq :: Proxy (Ranked n a) -> ShapeTree (Ranked n a) -> ShapeTree (Ranked n a) -> Bool Source #

mshapeTreeEmpty :: Proxy (Ranked n a) -> ShapeTree (Ranked n a) -> Bool Source #

mshowShapeTree :: Proxy (Ranked n a) -> ShapeTree (Ranked n a) -> String Source #

marrayStrides :: forall (sh :: [Maybe Nat]). Mixed sh (Ranked n a) -> Bag [Int] Source #

mvecsWrite :: forall (sh :: [Maybe Nat]) s. IShX sh -> IIxX sh -> Ranked n a -> MixedVecs s sh (Ranked n a) -> ST s () Source #

mvecsWritePartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) s. IShX (sh ++ sh') -> IIxX sh -> Mixed sh' (Ranked n a) -> MixedVecs s (sh ++ sh') (Ranked n a) -> ST s () Source #

mvecsFreeze :: forall (sh :: [Maybe Nat]) s. IShX sh -> MixedVecs s sh (Ranked n a) -> ST s (Mixed sh (Ranked n a)) Source #

(KnownNat n, KnownElt a) => KnownElt (Ranked n a) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

Methods

memptyArrayUnsafe :: forall (sh :: [Maybe Nat]). IShX sh -> Mixed sh (Ranked n a) Source #

mvecsUnsafeNew :: forall (sh :: [Maybe Nat]) s. IShX sh -> Ranked n a -> ST s (MixedVecs s sh (Ranked n a)) Source #

mvecsNewEmpty :: forall s (sh :: [Maybe Nat]). Proxy (Ranked n a) -> ST s (MixedVecs s sh (Ranked n a)) Source #

newtype MixedVecs s sh (Ranked n a) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

newtype MixedVecs s sh (Ranked n a) = MV_Ranked (MixedVecs s sh (Mixed (Replicate n ('Nothing :: Maybe Nat)) a))
newtype Mixed sh (Ranked n a) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

newtype Mixed sh (Ranked n a) = M_Ranked (Mixed sh (Mixed (Replicate n ('Nothing :: Maybe Nat)) a))
type Rep (Mixed sh (Ranked n a)) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

type Rep (Mixed sh (Ranked n a)) = D1 ('MetaData "Mixed" "Data.Array.Nested.Ranked.Base" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Ranked" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Mixed (Replicate n ('Nothing :: Maybe Nat)) a)))))
type ShapeTree (Ranked n a) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

type ShapeTree (Ranked n a) = (IShR n, ShapeTree a)

data ListR (n :: Nat) i where Source #

Constructors

ZR :: forall i. ListR 0 i 
(:::) :: forall (n1 :: Natural) {i}. i -> ListR n1 i -> ListR (n1 + 1) i infixr 3 

Instances

Instances details
Foldable (ListR n) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

fold :: Monoid m => ListR n m -> m #

foldMap :: Monoid m => (a -> m) -> ListR n a -> m #

foldMap' :: Monoid m => (a -> m) -> ListR n a -> m #

foldr :: (a -> b -> b) -> b -> ListR n a -> b #

foldr' :: (a -> b -> b) -> b -> ListR n a -> b #

foldl :: (b -> a -> b) -> b -> ListR n a -> b #

foldl' :: (b -> a -> b) -> b -> ListR n a -> b #

foldr1 :: (a -> a -> a) -> ListR n a -> a #

foldl1 :: (a -> a -> a) -> ListR n a -> a #

toList :: ListR n a -> [a] #

null :: ListR n a -> Bool #

length :: ListR n a -> Int #

elem :: Eq a => a -> ListR n a -> Bool #

maximum :: Ord a => ListR n a -> a #

minimum :: Ord a => ListR n a -> a #

sum :: Num a => ListR n a -> a #

product :: Num a => ListR n a -> a #

Functor (ListR n) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

fmap :: (a -> b) -> ListR n a -> ListR n b #

(<$) :: a -> ListR n b -> ListR n a #

KnownNat n => IsList (ListR n i) Source #

Untyped: length is checked at runtime.

Instance details

Defined in Data.Array.Nested.Ranked.Shape

Associated Types

type Item (ListR n i) 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

type Item (ListR n i) = i

Methods

fromList :: [Item (ListR n i)] -> ListR n i #

fromListN :: Int -> [Item (ListR n i)] -> ListR n i #

toList :: ListR n i -> [Item (ListR n i)] #

Show i => Show (ListR n i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

showsPrec :: Int -> ListR n i -> ShowS #

show :: ListR n i -> String #

showList :: [ListR n i] -> ShowS #

NFData i => NFData (ListR n i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

rnf :: ListR n i -> () #

Eq i => Eq (ListR n i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

(==) :: ListR n i -> ListR n i -> Bool #

(/=) :: ListR n i -> ListR n i -> Bool #

Ord i => Ord (ListR n i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

compare :: ListR n i -> ListR n i -> Ordering #

(<) :: ListR n i -> ListR n i -> Bool #

(<=) :: ListR n i -> ListR n i -> Bool #

(>) :: ListR n i -> ListR n i -> Bool #

(>=) :: ListR n i -> ListR n i -> Bool #

max :: ListR n i -> ListR n i -> ListR n i #

min :: ListR n i -> ListR n i -> ListR n i #

type Item (ListR n i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

type Item (ListR n i) = i

newtype IxR (n :: Nat) i Source #

An index into a rank-typed array.

Constructors

IxR (ListR n i) 

Bundled Patterns

pattern ZIR :: () => n ~ 0 => IxR n i 
pattern (:.:) :: forall {n1} {i} n. () => (n + 1) ~ n1 => i -> IxR n i -> IxR n1 i infixr 3 

Instances

Instances details
Foldable (IxR n) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

fold :: Monoid m => IxR n m -> m #

foldMap :: Monoid m => (a -> m) -> IxR n a -> m #

foldMap' :: Monoid m => (a -> m) -> IxR n a -> m #

foldr :: (a -> b -> b) -> b -> IxR n a -> b #

foldr' :: (a -> b -> b) -> b -> IxR n a -> b #

foldl :: (b -> a -> b) -> b -> IxR n a -> b #

foldl' :: (b -> a -> b) -> b -> IxR n a -> b #

foldr1 :: (a -> a -> a) -> IxR n a -> a #

foldl1 :: (a -> a -> a) -> IxR n a -> a #

toList :: IxR n a -> [a] #

null :: IxR n a -> Bool #

length :: IxR n a -> Int #

elem :: Eq a => a -> IxR n a -> Bool #

maximum :: Ord a => IxR n a -> a #

minimum :: Ord a => IxR n a -> a #

sum :: Num a => IxR n a -> a #

product :: Num a => IxR n a -> a #

Functor (IxR n) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

fmap :: (a -> b) -> IxR n a -> IxR n b #

(<$) :: a -> IxR n b -> IxR n a #

Generic (IxR n i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Associated Types

type Rep (IxR n i) 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

type Rep (IxR n i) = D1 ('MetaData "IxR" "Data.Array.Nested.Ranked.Shape" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "IxR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListR n i))))

Methods

from :: IxR n i -> Rep (IxR n i) x #

to :: Rep (IxR n i) x -> IxR n i #

KnownNat n => IsList (IxR n i) Source #

Untyped: length is checked at runtime.

Instance details

Defined in Data.Array.Nested.Ranked.Shape

Associated Types

type Item (IxR n i) 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

type Item (IxR n i) = i

Methods

fromList :: [Item (IxR n i)] -> IxR n i #

fromListN :: Int -> [Item (IxR n i)] -> IxR n i #

toList :: IxR n i -> [Item (IxR n i)] #

Show i => Show (IxR n i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

showsPrec :: Int -> IxR n i -> ShowS #

show :: IxR n i -> String #

showList :: [IxR n i] -> ShowS #

NFData i => NFData (IxR sh i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

rnf :: IxR sh i -> () #

Eq i => Eq (IxR n i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

(==) :: IxR n i -> IxR n i -> Bool #

(/=) :: IxR n i -> IxR n i -> Bool #

Ord i => Ord (IxR n i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

compare :: IxR n i -> IxR n i -> Ordering #

(<) :: IxR n i -> IxR n i -> Bool #

(<=) :: IxR n i -> IxR n i -> Bool #

(>) :: IxR n i -> IxR n i -> Bool #

(>=) :: IxR n i -> IxR n i -> Bool #

max :: IxR n i -> IxR n i -> IxR n i #

min :: IxR n i -> IxR n i -> IxR n i #

type Rep (IxR n i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

type Rep (IxR n i) = D1 ('MetaData "IxR" "Data.Array.Nested.Ranked.Shape" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "IxR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListR n i))))
type Item (IxR n i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

type Item (IxR n i) = i

type IIxR (n :: Nat) = IxR n Int Source #

newtype ShR (n :: Nat) i Source #

Constructors

ShR (ListR n i) 

Bundled Patterns

pattern ZSR :: () => n ~ 0 => ShR n i 
pattern (:$:) :: forall {n1} {i} n. () => (n + 1) ~ n1 => i -> ShR n i -> ShR n1 i infixr 3 

Instances

Instances details
Foldable (ShR n) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

fold :: Monoid m => ShR n m -> m #

foldMap :: Monoid m => (a -> m) -> ShR n a -> m #

foldMap' :: Monoid m => (a -> m) -> ShR n a -> m #

foldr :: (a -> b -> b) -> b -> ShR n a -> b #

foldr' :: (a -> b -> b) -> b -> ShR n a -> b #

foldl :: (b -> a -> b) -> b -> ShR n a -> b #

foldl' :: (b -> a -> b) -> b -> ShR n a -> b #

foldr1 :: (a -> a -> a) -> ShR n a -> a #

foldl1 :: (a -> a -> a) -> ShR n a -> a #

toList :: ShR n a -> [a] #

null :: ShR n a -> Bool #

length :: ShR n a -> Int #

elem :: Eq a => a -> ShR n a -> Bool #

maximum :: Ord a => ShR n a -> a #

minimum :: Ord a => ShR n a -> a #

sum :: Num a => ShR n a -> a #

product :: Num a => ShR n a -> a #

Functor (ShR n) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

fmap :: (a -> b) -> ShR n a -> ShR n b #

(<$) :: a -> ShR n b -> ShR n a #

Generic (ShR n i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Associated Types

type Rep (ShR n i) 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

type Rep (ShR n i) = D1 ('MetaData "ShR" "Data.Array.Nested.Ranked.Shape" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "ShR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListR n i))))

Methods

from :: ShR n i -> Rep (ShR n i) x #

to :: Rep (ShR n i) x -> ShR n i #

KnownNat n => IsList (ShR n i) Source #

Untyped: length is checked at runtime.

Instance details

Defined in Data.Array.Nested.Ranked.Shape

Associated Types

type Item (ShR n i) 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

type Item (ShR n i) = i

Methods

fromList :: [Item (ShR n i)] -> ShR n i #

fromListN :: Int -> [Item (ShR n i)] -> ShR n i #

toList :: ShR n i -> [Item (ShR n i)] #

Show i => Show (ShR n i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

showsPrec :: Int -> ShR n i -> ShowS #

show :: ShR n i -> String #

showList :: [ShR n i] -> ShowS #

NFData i => NFData (ShR sh i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

rnf :: ShR sh i -> () #

Eq i => Eq (ShR n i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

(==) :: ShR n i -> ShR n i -> Bool #

(/=) :: ShR n i -> ShR n i -> Bool #

Ord i => Ord (ShR n i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

Methods

compare :: ShR n i -> ShR n i -> Ordering #

(<) :: ShR n i -> ShR n i -> Bool #

(<=) :: ShR n i -> ShR n i -> Bool #

(>) :: ShR n i -> ShR n i -> Bool #

(>=) :: ShR n i -> ShR n i -> Bool #

max :: ShR n i -> ShR n i -> ShR n i #

min :: ShR n i -> ShR n i -> ShR n i #

type Rep (ShR n i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

type Rep (ShR n i) = D1 ('MetaData "ShR" "Data.Array.Nested.Ranked.Shape" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "ShR" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListR n i))))
type Item (ShR n i) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Shape

type Item (ShR n i) = i

type IShR (n :: Nat) = ShR n Int Source #

rshape :: forall a (n :: Nat). Elt a => Ranked n a -> IShR n Source #

rrank :: forall a (n :: Nat). Elt a => Ranked n a -> SNat n Source #

rsize :: forall a (n :: Nat). Elt a => Ranked n a -> Int Source #

The total number of elements in the array.

rindex :: forall a (n :: Nat). Elt a => Ranked n a -> IIxR n -> a Source #

rindexPartial :: forall (n :: Natural) (m :: Natural) a. Elt a => Ranked (n + m) a -> IIxR n -> Ranked m a Source #

rgenerate :: forall (n :: Nat) a. KnownElt a => IShR n -> (IIxR n -> a) -> Ranked n a Source #

WARNING: All values returned from the function must have equal shape. See the documentation of mgenerate for more details.

rsumOuter1 :: forall (n :: Natural) a. (NumElt a, PrimElt a) => Ranked (n + 1) a -> Ranked n a Source #

rsumAllPrim :: forall a (n :: Nat). (PrimElt a, NumElt a) => Ranked n a -> a Source #

rtranspose :: forall (n :: Nat) a. Elt a => PermR -> Ranked n a -> Ranked n a Source #

rappend :: forall (n :: Natural) a. Elt a => Ranked (n + 1) a -> Ranked (n + 1) a -> Ranked (n + 1) a Source #

rconcat :: forall (n :: Natural) a. Elt a => NonEmpty (Ranked (n + 1) a) -> Ranked (n + 1) a Source #

rscalar :: Elt a => a -> Ranked 0 a Source #

rfromVector :: forall (n :: Nat) a. PrimElt a => IShR n -> Vector a -> Ranked n a Source #

rtoVector :: forall a (n :: Nat). PrimElt a => Ranked n a -> Vector a Source #

runScalar :: Elt a => Ranked 0 a -> a Source #

rrerank :: forall (n1 :: Nat) (n2 :: Nat) (n :: Nat) a b. (PrimElt a, PrimElt b) => SNat n -> IShR n2 -> (Ranked n1 a -> Ranked n2 b) -> Ranked (n + n1) a -> Ranked (n + n2) b Source #

If there is a zero-sized dimension in the n-prefix of the shape of the input array, then there is no way to deduce the full shape of the output array (more precisely, the n2 part): that could only come from calling f, and there are no subarrays to call f on. orthotope errors out in this case; we choose to fill the n2 part of the output shape with zeros.

For example, if:

arr :: Ranked 5 Int   -- of shape [3, 0, 4, 2, 21]
f :: Ranked 2 Int -> Ranked 3 Float

then:

rrerank _ _ _ f arr :: Ranked 5 Float

and this result will have shape [3, 0, 4, 0, 0, 0]. Note that the "reranked" part (the last 3 entries) are zero; we don't know if f intended to return an array with shape all-0 here (it probably didn't), but there is no better number to put here absent a subarray of the input to pass to f.

rreplicate :: forall (n :: Nat) (m :: Nat) a. Elt a => IShR n -> Ranked m a -> Ranked (n + m) a Source #

rreplicateScal :: forall (n :: Nat) a. PrimElt a => IShR n -> a -> Ranked n a Source #

rfromListOuter :: forall (n :: Nat) a. Elt a => NonEmpty (Ranked n a) -> Ranked (n + 1) a Source #

rfromListLinear :: forall (n :: Nat) a. Elt a => IShR n -> NonEmpty a -> Ranked n a Source #

rfromListPrim :: PrimElt a => [a] -> Ranked 1 a Source #

rfromListPrimLinear :: forall a (n :: Nat). PrimElt a => IShR n -> [a] -> Ranked n a Source #

rtoList :: Elt a => Ranked 1 a -> [a] Source #

rtoListOuter :: forall (n :: Natural) a. Elt a => Ranked (n + 1) a -> [Ranked n a] Source #

rtoListLinear :: forall a (n :: Nat). Elt a => Ranked n a -> [a] Source #

rslice :: forall (n :: Natural) a. Elt a => Int -> Int -> Ranked (n + 1) a -> Ranked (n + 1) a Source #

rrev1 :: forall (n :: Natural) a. Elt a => Ranked (n + 1) a -> Ranked (n + 1) a Source #

rreshape :: forall (n :: Nat) (n' :: Nat) a. Elt a => IShR n' -> Ranked n a -> Ranked n' a Source #

rflatten :: forall a (n :: Nat). Elt a => Ranked n a -> Ranked 1 a Source #

riota :: (Enum a, PrimElt a) => Int -> Ranked 1 a Source #

rminIndexPrim :: forall a (n :: Nat). (PrimElt a, NumElt a) => Ranked n a -> IIxR n Source #

Throws if the array is empty.

rmaxIndexPrim :: forall a (n :: Nat). (PrimElt a, NumElt a) => Ranked n a -> IIxR n Source #

Throws if the array is empty.

rdot1Inner :: forall (n :: Natural) a. (PrimElt a, NumElt a) => Ranked (n + 1) a -> Ranked (n + 1) a -> Ranked n a Source #

rdot :: forall a (n :: Nat). (PrimElt a, NumElt a) => Ranked n a -> Ranked n a -> a Source #

This has a temporary, suboptimal implementation in terms of mflatten. Prefer rdot1Inner if applicable.

rnest :: forall (n :: Nat) (m :: Natural) a. Elt a => SNat n -> Ranked (n + m) a -> Ranked n (Ranked m a) Source #

runNest :: forall (n :: Nat) (m :: Nat) a. Elt a => Ranked n (Ranked m a) -> Ranked (n + m) a Source #

rzip :: forall a b (n :: Nat). (Elt a, Elt b) => Ranked n a -> Ranked n b -> Ranked n (a, b) Source #

runzip :: forall (n :: Nat) a b. Ranked n (a, b) -> (Ranked n a, Ranked n b) Source #

Lifting orthotope operations to Ranked arrays

rlift :: forall (n1 :: Nat) (n2 :: Nat) a. Elt a => SNat n2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (Replicate n1 ('Nothing :: Maybe Nat) ++ sh') b -> XArray (Replicate n2 ('Nothing :: Maybe Nat) ++ sh') b) -> Ranked n1 a -> Ranked n2 a Source #

See the documentation of mlift.

rlift2 :: forall (n1 :: Nat) (n2 :: Nat) (n3 :: Nat) a. Elt a => SNat n3 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (Replicate n1 ('Nothing :: Maybe Nat) ++ sh') b -> XArray (Replicate n2 ('Nothing :: Maybe Nat) ++ sh') b -> XArray (Replicate n3 ('Nothing :: Maybe Nat) ++ sh') b) -> Ranked n1 a -> Ranked n2 a -> Ranked n3 a Source #

See the documentation of mlift2.

Conversions

rtoXArrayPrim :: forall a (n :: Nat). PrimElt a => Ranked n a -> (IShR n, XArray (Replicate n ('Nothing :: Maybe Nat)) a) Source #

rfromXArrayPrim :: forall a (n :: Nat). PrimElt a => SNat n -> XArray (Replicate n ('Nothing :: Maybe Nat)) a -> Ranked n a Source #

rtoMixed :: forall (n :: Nat) a. Ranked n a -> Mixed (Replicate n ('Nothing :: Maybe Nat)) a Source #

rcastToMixed :: forall (sh :: [Maybe Nat]) (n :: Natural) a. (Rank sh ~ n, Elt a) => StaticShX sh -> Ranked n a -> Mixed sh a Source #

A more weakly-typed version of rtoMixed that does a runtime shape compatibility check.

rcastToShaped :: forall a (sh :: [Nat]). Elt a => Ranked (Rank sh) a -> ShS sh -> Shaped sh a Source #

rfromOrthotope :: forall a (n :: Nat). PrimElt a => SNat n -> Array n a -> Ranked n a Source #

rtoOrthotope :: forall a (n :: Nat). PrimElt a => Ranked n a -> Array n a Source #

Additional arithmetic operations

These functions are separate top-level functions, and not exposed in instances for RealFloat and Integral, because those classes include a variety of other functions that make no sense for arrays. This problem already occurs with fromInteger, fromRational and pi, but having Num, Fractional and Floating available is just too useful.

rquotArray :: forall a (n :: Nat). (IntElt a, PrimElt a) => Ranked n a -> Ranked n a -> Ranked n a Source #

rremArray :: forall a (n :: Nat). (IntElt a, PrimElt a) => Ranked n a -> Ranked n a -> Ranked n a Source #

ratan2Array :: forall a (n :: Nat). (FloatElt a, PrimElt a) => Ranked n a -> Ranked n a -> Ranked n a Source #

Shaped arrays

newtype Shaped (sh :: [Nat]) a Source #

A shape-typed array: the full shape of the array (the sizes of its dimensions) is represented on the type level as a list of Nats. Note that these are GHC.TypeLits naturals, because we do not need induction over them and we want very large arrays to be possible.

Like for Ranked, the valid elements are described by the Elt type class, and Shaped itself is again an instance of Elt as well.

Shaped is a newtype around a Mixed of Justs.

Constructors

Shaped (Mixed (MapJust sh) a) 

Instances

Instances details
(FloatElt a, PrimElt a) => Floating (Shaped sh a) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

Methods

pi :: Shaped sh a #

exp :: Shaped sh a -> Shaped sh a #

log :: Shaped sh a -> Shaped sh a #

sqrt :: Shaped sh a -> Shaped sh a #

(**) :: Shaped sh a -> Shaped sh a -> Shaped sh a #

logBase :: Shaped sh a -> Shaped sh a -> Shaped sh a #

sin :: Shaped sh a -> Shaped sh a #

cos :: Shaped sh a -> Shaped sh a #

tan :: Shaped sh a -> Shaped sh a #

asin :: Shaped sh a -> Shaped sh a #

acos :: Shaped sh a -> Shaped sh a #

atan :: Shaped sh a -> Shaped sh a #

sinh :: Shaped sh a -> Shaped sh a #

cosh :: Shaped sh a -> Shaped sh a #

tanh :: Shaped sh a -> Shaped sh a #

asinh :: Shaped sh a -> Shaped sh a #

acosh :: Shaped sh a -> Shaped sh a #

atanh :: Shaped sh a -> Shaped sh a #

log1p :: Shaped sh a -> Shaped sh a #

expm1 :: Shaped sh a -> Shaped sh a #

log1pexp :: Shaped sh a -> Shaped sh a #

log1mexp :: Shaped sh a -> Shaped sh a #

Generic (Mixed sh (Shaped sh' a)) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

Associated Types

type Rep (Mixed sh (Shaped sh' a)) 
Instance details

Defined in Data.Array.Nested.Shaped.Base

type Rep (Mixed sh (Shaped sh' a)) = D1 ('MetaData "Mixed" "Data.Array.Nested.Shaped.Base" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Shaped" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Mixed (MapJust sh') a)))))

Methods

from :: Mixed sh (Shaped sh' a) -> Rep (Mixed sh (Shaped sh' a)) x #

to :: Rep (Mixed sh (Shaped sh' a)) x -> Mixed sh (Shaped sh' a) #

(NumElt a, PrimElt a) => Num (Shaped sh a) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

Methods

(+) :: Shaped sh a -> Shaped sh a -> Shaped sh a #

(-) :: Shaped sh a -> Shaped sh a -> Shaped sh a #

(*) :: Shaped sh a -> Shaped sh a -> Shaped sh a #

negate :: Shaped sh a -> Shaped sh a #

abs :: Shaped sh a -> Shaped sh a #

signum :: Shaped sh a -> Shaped sh a #

fromInteger :: Integer -> Shaped sh a #

(FloatElt a, PrimElt a) => Fractional (Shaped sh a) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

Methods

(/) :: Shaped sh a -> Shaped sh a -> Shaped sh a #

recip :: Shaped sh a -> Shaped sh a #

fromRational :: Rational -> Shaped sh a #

(Show a, Elt a) => Show (Shaped n a) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

Methods

showsPrec :: Int -> Shaped n a -> ShowS #

show :: Shaped n a -> String #

showList :: [Shaped n a] -> ShowS #

Elt a => NFData (Shaped sh a) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

Methods

rnf :: Shaped sh a -> () #

Eq (Mixed sh (Mixed (MapJust sh') a)) => Eq (Mixed sh (Shaped sh' a)) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

Methods

(==) :: Mixed sh (Shaped sh' a) -> Mixed sh (Shaped sh' a) -> Bool #

(/=) :: Mixed sh (Shaped sh' a) -> Mixed sh (Shaped sh' a) -> Bool #

Eq (Mixed (MapJust sh) a) => Eq (Shaped sh a) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

Methods

(==) :: Shaped sh a -> Shaped sh a -> Bool #

(/=) :: Shaped sh a -> Shaped sh a -> Bool #

Ord (Mixed (MapJust sh) a) => Ord (Shaped sh a) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

Methods

compare :: Shaped sh a -> Shaped sh a -> Ordering #

(<) :: Shaped sh a -> Shaped sh a -> Bool #

(<=) :: Shaped sh a -> Shaped sh a -> Bool #

(>) :: Shaped sh a -> Shaped sh a -> Bool #

(>=) :: Shaped sh a -> Shaped sh a -> Bool #

max :: Shaped sh a -> Shaped sh a -> Shaped sh a #

min :: Shaped sh a -> Shaped sh a -> Shaped sh a #

Elt a => Elt (Shaped sh a) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

Associated Types

type ShapeTree (Shaped sh a) 
Instance details

Defined in Data.Array.Nested.Shaped.Base

type ShapeTree (Shaped sh a) = (ShS sh, ShapeTree a)

Methods

mshape :: forall (sh0 :: [Maybe Nat]). Mixed sh0 (Shaped sh a) -> IShX sh0 Source #

mindex :: forall (sh0 :: [Maybe Nat]). Mixed sh0 (Shaped sh a) -> IIxX sh0 -> Shaped sh a Source #

mindexPartial :: forall (sh0 :: [Maybe Nat]) (sh' :: [Maybe Nat]). Mixed (sh0 ++ sh') (Shaped sh a) -> IIxX sh0 -> Mixed sh' (Shaped sh a) Source #

mscalar :: Shaped sh a -> Mixed ('[] :: [Maybe Nat]) (Shaped sh a) Source #

mfromListOuter :: forall (sh0 :: [Maybe Nat]). NonEmpty (Mixed sh0 (Shaped sh a)) -> Mixed (('Nothing :: Maybe Nat) ': sh0) (Shaped sh a) Source #

mtoListOuter :: forall (n :: Maybe Nat) (sh0 :: [Maybe Nat]). Mixed (n ': sh0) (Shaped sh a) -> [Mixed sh0 (Shaped sh a)] Source #

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b) -> Mixed sh1 (Shaped sh a) -> Mixed sh2 (Shaped sh a) Source #

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). StaticShX sh3 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b -> XArray (sh3 ++ sh') b) -> Mixed sh1 (Shaped sh a) -> Mixed sh2 (Shaped sh a) -> Mixed sh3 (Shaped sh a) Source #

mliftL :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> NonEmpty (XArray (sh1 ++ sh') b) -> NonEmpty (XArray (sh2 ++ sh') b)) -> NonEmpty (Mixed sh1 (Shaped sh a)) -> NonEmpty (Mixed sh2 (Shaped sh a)) Source #

mcastPartial :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh' :: [Maybe Nat]). Rank sh1 ~ Rank sh2 => StaticShX sh1 -> StaticShX sh2 -> Proxy sh' -> Mixed (sh1 ++ sh') (Shaped sh a) -> Mixed (sh2 ++ sh') (Shaped sh a) Source #

mtranspose :: forall (is :: [Natural]) (sh0 :: [Maybe Nat]). (IsPermutation is, Rank is <= Rank sh0) => Perm is -> Mixed sh0 (Shaped sh a) -> Mixed (PermutePrefix is sh0) (Shaped sh a) Source #

mconcat :: forall (sh0 :: [Maybe Nat]). NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh0) (Shaped sh a)) -> Mixed (('Nothing :: Maybe Nat) ': sh0) (Shaped sh a) Source #

mrnf :: forall (sh0 :: [Maybe Nat]). Mixed sh0 (Shaped sh a) -> () Source #

mshapeTree :: Shaped sh a -> ShapeTree (Shaped sh a) Source #

mshapeTreeEq :: Proxy (Shaped sh a) -> ShapeTree (Shaped sh a) -> ShapeTree (Shaped sh a) -> Bool Source #

mshapeTreeEmpty :: Proxy (Shaped sh a) -> ShapeTree (Shaped sh a) -> Bool Source #

mshowShapeTree :: Proxy (Shaped sh a) -> ShapeTree (Shaped sh a) -> String Source #

marrayStrides :: forall (sh0 :: [Maybe Nat]). Mixed sh0 (Shaped sh a) -> Bag [Int] Source #

mvecsWrite :: forall (sh0 :: [Maybe Nat]) s. IShX sh0 -> IIxX sh0 -> Shaped sh a -> MixedVecs s sh0 (Shaped sh a) -> ST s () Source #

mvecsWritePartial :: forall (sh0 :: [Maybe Nat]) (sh' :: [Maybe Nat]) s. IShX (sh0 ++ sh') -> IIxX sh0 -> Mixed sh' (Shaped sh a) -> MixedVecs s (sh0 ++ sh') (Shaped sh a) -> ST s () Source #

mvecsFreeze :: forall (sh0 :: [Maybe Nat]) s. IShX sh0 -> MixedVecs s sh0 (Shaped sh a) -> ST s (Mixed sh0 (Shaped sh a)) Source #

(KnownShS sh, KnownElt a) => KnownElt (Shaped sh a) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

Methods

memptyArrayUnsafe :: forall (sh0 :: [Maybe Nat]). IShX sh0 -> Mixed sh0 (Shaped sh a) Source #

mvecsUnsafeNew :: forall (sh0 :: [Maybe Nat]) s. IShX sh0 -> Shaped sh a -> ST s (MixedVecs s sh0 (Shaped sh a)) Source #

mvecsNewEmpty :: forall s (sh0 :: [Maybe Nat]). Proxy (Shaped sh a) -> ST s (MixedVecs s sh0 (Shaped sh a)) Source #

newtype MixedVecs s sh (Shaped sh' a) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

newtype MixedVecs s sh (Shaped sh' a) = MV_Shaped (MixedVecs s sh (Mixed (MapJust sh') a))
newtype Mixed sh (Shaped sh' a) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

newtype Mixed sh (Shaped sh' a) = M_Shaped (Mixed sh (Mixed (MapJust sh') a))
type Rep (Mixed sh (Shaped sh' a)) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

type Rep (Mixed sh (Shaped sh' a)) = D1 ('MetaData "Mixed" "Data.Array.Nested.Shaped.Base" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Shaped" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Mixed (MapJust sh') a)))))
type ShapeTree (Shaped sh a) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

type ShapeTree (Shaped sh a) = (ShS sh, ShapeTree a)

data ListS (sh :: [Nat]) (f :: Nat -> Type) where Source #

Note: The KnownNat constraint on (::$) is deprecated and should be removed in a future release.

Constructors

ZS :: forall (f :: Nat -> Type). ListS ('[] :: [Nat]) f 
(::$) :: forall (n :: Nat) (sh1 :: [Nat]) {f :: Nat -> Type}. KnownNat n => f n -> ListS sh1 f -> ListS (n ': sh1) f infixr 3 

Instances

Instances details
KnownShS sh => IsList (ListS sh (Const i :: Nat -> Type)) Source #

Untyped: length is checked at runtime.

Instance details

Defined in Data.Array.Nested.Shaped.Shape

Associated Types

type Item (ListS sh (Const i :: Nat -> Type)) 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

type Item (ListS sh (Const i :: Nat -> Type)) = i

Methods

fromList :: [Item (ListS sh (Const i :: Nat -> Type))] -> ListS sh (Const i :: Nat -> Type) #

fromListN :: Int -> [Item (ListS sh (Const i :: Nat -> Type))] -> ListS sh (Const i :: Nat -> Type) #

toList :: ListS sh (Const i :: Nat -> Type) -> [Item (ListS sh (Const i :: Nat -> Type))] #

(forall (n :: Nat). Show (f n)) => Show (ListS sh f) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Methods

showsPrec :: Int -> ListS sh f -> ShowS #

show :: ListS sh f -> String #

showList :: [ListS sh f] -> ShowS #

(forall (m :: Nat). NFData (f m)) => NFData (ListS n f) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Methods

rnf :: ListS n f -> () #

(forall (n :: Nat). Eq (f n)) => Eq (ListS sh f) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Methods

(==) :: ListS sh f -> ListS sh f -> Bool #

(/=) :: ListS sh f -> ListS sh f -> Bool #

(forall (n :: Nat). Ord (f n)) => Ord (ListS sh f) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Methods

compare :: ListS sh f -> ListS sh f -> Ordering #

(<) :: ListS sh f -> ListS sh f -> Bool #

(<=) :: ListS sh f -> ListS sh f -> Bool #

(>) :: ListS sh f -> ListS sh f -> Bool #

(>=) :: ListS sh f -> ListS sh f -> Bool #

max :: ListS sh f -> ListS sh f -> ListS sh f #

min :: ListS sh f -> ListS sh f -> ListS sh f #

type Item (ListS sh (Const i :: Nat -> Type)) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

type Item (ListS sh (Const i :: Nat -> Type)) = i

newtype IxS (sh :: [Nat]) i Source #

An index into a shape-typed array.

Constructors

IxS (ListS sh (Const i :: Nat -> Type)) 

Bundled Patterns

pattern ZIS :: () => sh ~ ('[] :: [Nat]) => IxS sh i 
pattern (:.$) :: forall {sh1} {i} (n :: Nat) sh. () => forall. (KnownNat n, (n ': sh) ~ sh1) => i -> IxS sh i -> IxS sh1 i infixr 3

Note: The KnownNat constraint on (:.$) is deprecated and should be removed in a future release.

Instances

Instances details
Foldable (IxS sh) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Methods

fold :: Monoid m => IxS sh m -> m #

foldMap :: Monoid m => (a -> m) -> IxS sh a -> m #

foldMap' :: Monoid m => (a -> m) -> IxS sh a -> m #

foldr :: (a -> b -> b) -> b -> IxS sh a -> b #

foldr' :: (a -> b -> b) -> b -> IxS sh a -> b #

foldl :: (b -> a -> b) -> b -> IxS sh a -> b #

foldl' :: (b -> a -> b) -> b -> IxS sh a -> b #

foldr1 :: (a -> a -> a) -> IxS sh a -> a #

foldl1 :: (a -> a -> a) -> IxS sh a -> a #

toList :: IxS sh a -> [a] #

null :: IxS sh a -> Bool #

length :: IxS sh a -> Int #

elem :: Eq a => a -> IxS sh a -> Bool #

maximum :: Ord a => IxS sh a -> a #

minimum :: Ord a => IxS sh a -> a #

sum :: Num a => IxS sh a -> a #

product :: Num a => IxS sh a -> a #

Functor (IxS sh) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Methods

fmap :: (a -> b) -> IxS sh a -> IxS sh b #

(<$) :: a -> IxS sh b -> IxS sh a #

Generic (IxS sh i) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Associated Types

type Rep (IxS sh i) 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

type Rep (IxS sh i) = D1 ('MetaData "IxS" "Data.Array.Nested.Shaped.Shape" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "IxS" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListS sh (Const i :: Nat -> Type)))))

Methods

from :: IxS sh i -> Rep (IxS sh i) x #

to :: Rep (IxS sh i) x -> IxS sh i #

KnownShS sh => IsList (IxS sh i) Source #

Very untyped: only length is checked (at runtime), index bounds are not checked.

Instance details

Defined in Data.Array.Nested.Shaped.Shape

Associated Types

type Item (IxS sh i) 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

type Item (IxS sh i) = i

Methods

fromList :: [Item (IxS sh i)] -> IxS sh i #

fromListN :: Int -> [Item (IxS sh i)] -> IxS sh i #

toList :: IxS sh i -> [Item (IxS sh i)] #

Show i => Show (IxS sh i) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Methods

showsPrec :: Int -> IxS sh i -> ShowS #

show :: IxS sh i -> String #

showList :: [IxS sh i] -> ShowS #

NFData i => NFData (IxS sh i) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Methods

rnf :: IxS sh i -> () #

Eq i => Eq (IxS sh i) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Methods

(==) :: IxS sh i -> IxS sh i -> Bool #

(/=) :: IxS sh i -> IxS sh i -> Bool #

Ord i => Ord (IxS sh i) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Methods

compare :: IxS sh i -> IxS sh i -> Ordering #

(<) :: IxS sh i -> IxS sh i -> Bool #

(<=) :: IxS sh i -> IxS sh i -> Bool #

(>) :: IxS sh i -> IxS sh i -> Bool #

(>=) :: IxS sh i -> IxS sh i -> Bool #

max :: IxS sh i -> IxS sh i -> IxS sh i #

min :: IxS sh i -> IxS sh i -> IxS sh i #

type Rep (IxS sh i) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

type Rep (IxS sh i) = D1 ('MetaData "IxS" "Data.Array.Nested.Shaped.Shape" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "IxS" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListS sh (Const i :: Nat -> Type)))))
type Item (IxS sh i) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

type Item (IxS sh i) = i

type IIxS (sh :: [Nat]) = IxS sh Int Source #

newtype ShS (sh :: [Nat]) Source #

The shape of a shape-typed array given as a list of SNat values.

Note that because the shape of a shape-typed array is known statically, you can also retrieve the array shape from a KnownShS dictionary.

Constructors

ShS (ListS sh SNat) 

Bundled Patterns

pattern ZSS :: () => sh ~ ('[] :: [Nat]) => ShS sh 
pattern (:$$) :: forall {sh1} (n :: Nat) sh. () => (KnownNat n, (n ': sh) ~ sh1) => SNat n -> ShS sh -> ShS sh1 infixr 3 

Instances

Instances details
Generic (ShS sh) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Associated Types

type Rep (ShS sh) 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

type Rep (ShS sh) = D1 ('MetaData "ShS" "Data.Array.Nested.Shaped.Shape" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "ShS" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListS sh SNat))))

Methods

from :: ShS sh -> Rep (ShS sh) x #

to :: Rep (ShS sh) x -> ShS sh #

KnownShS sh => IsList (ShS sh) Source #

Untyped: length and values are checked at runtime.

Instance details

Defined in Data.Array.Nested.Shaped.Shape

Associated Types

type Item (ShS sh) 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

type Item (ShS sh) = Int

Methods

fromList :: [Item (ShS sh)] -> ShS sh #

fromListN :: Int -> [Item (ShS sh)] -> ShS sh #

toList :: ShS sh -> [Item (ShS sh)] #

Show (ShS sh) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Methods

showsPrec :: Int -> ShS sh -> ShowS #

show :: ShS sh -> String #

showList :: [ShS sh] -> ShowS #

NFData (ShS sh) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Methods

rnf :: ShS sh -> () #

Eq (ShS sh) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Methods

(==) :: ShS sh -> ShS sh -> Bool #

(/=) :: ShS sh -> ShS sh -> Bool #

Ord (ShS sh) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Methods

compare :: ShS sh -> ShS sh -> Ordering #

(<) :: ShS sh -> ShS sh -> Bool #

(<=) :: ShS sh -> ShS sh -> Bool #

(>) :: ShS sh -> ShS sh -> Bool #

(>=) :: ShS sh -> ShS sh -> Bool #

max :: ShS sh -> ShS sh -> ShS sh #

min :: ShS sh -> ShS sh -> ShS sh #

TestEquality ShS Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Methods

testEquality :: forall (a :: [Nat]) (b :: [Nat]). ShS a -> ShS b -> Maybe (a :~: b) #

type Rep (ShS sh) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

type Rep (ShS sh) = D1 ('MetaData "ShS" "Data.Array.Nested.Shaped.Shape" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "ShS" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListS sh SNat))))
type Item (ShS sh) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

type Item (ShS sh) = Int

class KnownShS (sh :: [Nat]) where Source #

Evidence for the static part of a shape. This pops up only when you are polymorphic in the element type of an array.

Methods

knownShS :: ShS sh Source #

Instances

Instances details
KnownShS ('[] :: [Nat]) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Methods

knownShS :: ShS ('[] :: [Nat]) Source #

(KnownNat n, KnownShS sh) => KnownShS (n ': sh) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Shape

Methods

knownShS :: ShS (n ': sh) Source #

sshape :: forall (sh :: [Nat]) a. Elt a => Shaped sh a -> ShS sh Source #

srank :: forall a (sh :: [Nat]). Elt a => Shaped sh a -> SNat (Rank sh) Source #

ssize :: forall a (sh :: [Nat]). Elt a => Shaped sh a -> Int Source #

The total number of elements in the array.

sindex :: forall a (sh :: [Nat]). Elt a => Shaped sh a -> IIxS sh -> a Source #

sindexPartial :: forall (sh1 :: [Nat]) (sh2 :: [Nat]) a. Elt a => Shaped (sh1 ++ sh2) a -> IIxS sh1 -> Shaped sh2 a Source #

sgenerate :: forall (sh :: [Nat]) a. KnownElt a => ShS sh -> (IIxS sh -> a) -> Shaped sh a Source #

WARNING: All values returned from the function must have equal shape. See the documentation of mgenerate for more details.

ssumOuter1 :: forall (sh :: [Nat]) (n :: Nat) a. (NumElt a, PrimElt a) => Shaped (n ': sh) a -> Shaped sh a Source #

ssumAllPrim :: forall a (n :: [Nat]). (PrimElt a, NumElt a) => Shaped n a -> a Source #

stranspose :: forall (is :: [Natural]) (sh :: [Nat]) a. (IsPermutation is, Rank is <= Rank sh, Elt a) => Perm is -> Shaped sh a -> Shaped (PermutePrefix is sh) a Source #

sappend :: forall a (n :: Nat) (sh :: [Nat]) (m :: Nat). Elt a => Shaped (n ': sh) a -> Shaped (m ': sh) a -> Shaped ((n + m) ': sh) a Source #

sscalar :: Elt a => a -> Shaped ('[] :: [Nat]) a Source #

sfromVector :: forall a (sh :: [Nat]). PrimElt a => ShS sh -> Vector a -> Shaped sh a Source #

stoVector :: forall a (sh :: [Nat]). PrimElt a => Shaped sh a -> Vector a Source #

sunScalar :: Elt a => Shaped ('[] :: [Nat]) a -> a Source #

semptyArray :: forall a (sh :: [Nat]). KnownElt a => ShS sh -> Shaped (0 ': sh) a Source #

srerank :: forall (sh1 :: [Nat]) (sh2 :: [Nat]) (sh :: [Nat]) a b. (PrimElt a, PrimElt b) => ShS sh -> ShS sh2 -> (Shaped sh1 a -> Shaped sh2 b) -> Shaped (sh ++ sh1) a -> Shaped (sh ++ sh2) b Source #

sreplicate :: forall (sh :: [Nat]) (sh' :: [Nat]) a. Elt a => ShS sh -> Shaped sh' a -> Shaped (sh ++ sh') a Source #

sreplicateScal :: forall a (sh :: [Nat]). PrimElt a => ShS sh -> a -> Shaped sh a Source #

sfromList1 :: forall a (n :: Nat). Elt a => SNat n -> NonEmpty a -> Shaped '[n] a Source #

sfromListOuter :: forall a (n :: Nat) (sh :: [Nat]). Elt a => SNat n -> NonEmpty (Shaped sh a) -> Shaped (n ': sh) a Source #

sfromListLinear :: forall (sh :: [Nat]) a. Elt a => ShS sh -> NonEmpty a -> Shaped sh a Source #

sfromListPrim :: forall (n :: Nat) a. PrimElt a => SNat n -> [a] -> Shaped '[n] a Source #

sfromListPrimLinear :: forall a (sh :: [Nat]). PrimElt a => ShS sh -> [a] -> Shaped sh a Source #

stoList :: forall a (n :: Nat). Elt a => Shaped '[n] a -> [a] Source #

stoListOuter :: forall a (n :: Nat) (sh :: [Nat]). Elt a => Shaped (n ': sh) a -> [Shaped sh a] Source #

stoListLinear :: forall a (sh :: [Nat]). Elt a => Shaped sh a -> [a] Source #

sslice :: forall a (i :: Nat) (n :: Nat) (k :: Natural) (sh :: [Natural]). Elt a => SNat i -> SNat n -> Shaped (((i + n) + k) ': sh) a -> Shaped (n ': sh) a Source #

srev1 :: forall a (n :: Nat) (sh :: [Nat]). Elt a => Shaped (n ': sh) a -> Shaped (n ': sh) a Source #

sreshape :: forall a (sh :: [Natural]) (sh' :: [Natural]). (Elt a, Product sh ~ Product sh') => ShS sh' -> Shaped sh a -> Shaped sh' a Source #

sflatten :: forall a (sh :: [Nat]). Elt a => Shaped sh a -> Shaped '[Product sh] a Source #

siota :: forall a (n :: Nat). (Enum a, PrimElt a) => SNat n -> Shaped '[n] a Source #

sminIndexPrim :: forall a (sh :: [Nat]). (PrimElt a, NumElt a) => Shaped sh a -> IIxS sh Source #

Throws if the array is empty.

smaxIndexPrim :: forall a (sh :: [Nat]). (PrimElt a, NumElt a) => Shaped sh a -> IIxS sh Source #

Throws if the array is empty.

sdot1Inner :: forall (sh :: [Nat]) (n :: Nat) a. (PrimElt a, NumElt a) => Proxy n -> Shaped (sh ++ '[n]) a -> Shaped (sh ++ '[n]) a -> Shaped sh a Source #

sdot :: forall a (sh :: [Nat]). (PrimElt a, NumElt a) => Shaped sh a -> Shaped sh a -> a Source #

This has a temporary, suboptimal implementation in terms of mflatten. Prefer sdot1Inner if applicable.

snest :: forall (sh :: [Nat]) (sh' :: [Nat]) a. Elt a => ShS sh -> Shaped (sh ++ sh') a -> Shaped sh (Shaped sh' a) Source #

sunNest :: forall (sh :: [Nat]) (sh' :: [Nat]) a. Elt a => Shaped sh (Shaped sh' a) -> Shaped (sh ++ sh') a Source #

szip :: forall a b (sh :: [Nat]). (Elt a, Elt b) => Shaped sh a -> Shaped sh b -> Shaped sh (a, b) Source #

sunzip :: forall (sh :: [Nat]) a b. Shaped sh (a, b) -> (Shaped sh a, Shaped sh b) Source #

Lifting orthotope operations to Shaped arrays

slift :: forall (sh1 :: [Nat]) (sh2 :: [Nat]) a. Elt a => ShS sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (MapJust sh1 ++ sh') b -> XArray (MapJust sh2 ++ sh') b) -> Shaped sh1 a -> Shaped sh2 a Source #

See the documentation of mlift.

slift2 :: forall (sh1 :: [Nat]) (sh2 :: [Nat]) (sh3 :: [Nat]) a. Elt a => ShS sh3 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (MapJust sh1 ++ sh') b -> XArray (MapJust sh2 ++ sh') b -> XArray (MapJust sh3 ++ sh') b) -> Shaped sh1 a -> Shaped sh2 a -> Shaped sh3 a Source #

See the documentation of mlift.

Conversions

stoXArrayPrim :: forall a (sh :: [Nat]). PrimElt a => Shaped sh a -> (ShS sh, XArray (MapJust sh) a) Source #

sfromXArrayPrim :: forall a (sh :: [Nat]). PrimElt a => ShS sh -> XArray (MapJust sh) a -> Shaped sh a Source #

stoMixed :: forall (sh :: [Nat]) a. Shaped sh a -> Mixed (MapJust sh) a Source #

scastToMixed :: forall (sh :: [Nat]) (sh' :: [Maybe Nat]) a. (Elt a, Rank sh ~ Rank sh') => StaticShX sh' -> Shaped sh a -> Mixed sh' a Source #

A more weakly-typed version of stoMixed that does a runtime shape compatibility check.

stoRanked :: forall a (sh :: [Nat]). Elt a => Shaped sh a -> Ranked (Rank sh) a Source #

sfromOrthotope :: forall a (sh :: [Nat]). PrimElt a => ShS sh -> Array sh a -> Shaped sh a Source #

stoOrthotope :: forall a (sh :: [Nat]). PrimElt a => Shaped sh a -> Array sh a Source #

Additional arithmetic operations

These functions are separate top-level functions, and not exposed in instances for RealFloat and Integral, because those classes include a variety of other functions that make no sense for arrays. This problem already occurs with fromInteger, fromRational and pi, but having Num, Fractional and Floating available is just too useful.

squotArray :: forall a (sh :: [Nat]). (IntElt a, PrimElt a) => Shaped sh a -> Shaped sh a -> Shaped sh a Source #

sremArray :: forall a (sh :: [Nat]). (IntElt a, PrimElt a) => Shaped sh a -> Shaped sh a -> Shaped sh a Source #

satan2Array :: forall a (sh :: [Nat]). (FloatElt a, PrimElt a) => Shaped sh a -> Shaped sh a -> Shaped sh a Source #

Mixed arrays

data family Mixed (sh :: [Maybe Nat]) a Source #

Mixed arrays: some dimensions are size-typed, some are not. Distributes over product-typed elements using a data family so that the full array is always in struct-of-arrays format.

Built on top of XArray which is built on top of orthotope, meaning that dimension permutations (e.g. mtranspose) are typically free.

Many of the methods for working on Mixed arrays come from the Elt type class.

Instances

Instances details
(FloatElt a, PrimElt a) => Floating (Mixed sh a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

pi :: Mixed sh a #

exp :: Mixed sh a -> Mixed sh a #

log :: Mixed sh a -> Mixed sh a #

sqrt :: Mixed sh a -> Mixed sh a #

(**) :: Mixed sh a -> Mixed sh a -> Mixed sh a #

logBase :: Mixed sh a -> Mixed sh a -> Mixed sh a #

sin :: Mixed sh a -> Mixed sh a #

cos :: Mixed sh a -> Mixed sh a #

tan :: Mixed sh a -> Mixed sh a #

asin :: Mixed sh a -> Mixed sh a #

acos :: Mixed sh a -> Mixed sh a #

atan :: Mixed sh a -> Mixed sh a #

sinh :: Mixed sh a -> Mixed sh a #

cosh :: Mixed sh a -> Mixed sh a #

tanh :: Mixed sh a -> Mixed sh a #

asinh :: Mixed sh a -> Mixed sh a #

acosh :: Mixed sh a -> Mixed sh a #

atanh :: Mixed sh a -> Mixed sh a #

log1p :: Mixed sh a -> Mixed sh a #

expm1 :: Mixed sh a -> Mixed sh a #

log1pexp :: Mixed sh a -> Mixed sh a #

log1mexp :: Mixed sh a -> Mixed sh a #

Generic (Mixed sh CInt) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type Rep (Mixed sh CInt) 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh CInt) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_CInt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Primitive CInt)))))

Methods

from :: Mixed sh CInt -> Rep (Mixed sh CInt) x #

to :: Rep (Mixed sh CInt) x -> Mixed sh CInt #

Generic (Mixed sh Int32) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type Rep (Mixed sh Int32) 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh Int32) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Int32" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Primitive Int32)))))

Methods

from :: Mixed sh Int32 -> Rep (Mixed sh Int32) x #

to :: Rep (Mixed sh Int32) x -> Mixed sh Int32 #

Generic (Mixed sh Int64) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type Rep (Mixed sh Int64) 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh Int64) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Int64" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Primitive Int64)))))

Methods

from :: Mixed sh Int64 -> Rep (Mixed sh Int64) x #

to :: Rep (Mixed sh Int64) x -> Mixed sh Int64 #

Generic (Mixed sh (Primitive a)) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type Rep (Mixed sh (Primitive a)) 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh (Primitive a)) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'False) (C1 ('MetaCons "M_Primitive" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (IShX sh)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (XArray sh a))))

Methods

from :: Mixed sh (Primitive a) -> Rep (Mixed sh (Primitive a)) x #

to :: Rep (Mixed sh (Primitive a)) x -> Mixed sh (Primitive a) #

Generic (Mixed sh (Ranked n a)) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

Associated Types

type Rep (Mixed sh (Ranked n a)) 
Instance details

Defined in Data.Array.Nested.Ranked.Base

type Rep (Mixed sh (Ranked n a)) = D1 ('MetaData "Mixed" "Data.Array.Nested.Ranked.Base" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Ranked" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Mixed (Replicate n ('Nothing :: Maybe Nat)) a)))))

Methods

from :: Mixed sh (Ranked n a) -> Rep (Mixed sh (Ranked n a)) x #

to :: Rep (Mixed sh (Ranked n a)) x -> Mixed sh (Ranked n a) #

Generic (Mixed sh (Shaped sh' a)) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

Associated Types

type Rep (Mixed sh (Shaped sh' a)) 
Instance details

Defined in Data.Array.Nested.Shaped.Base

type Rep (Mixed sh (Shaped sh' a)) = D1 ('MetaData "Mixed" "Data.Array.Nested.Shaped.Base" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Shaped" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Mixed (MapJust sh') a)))))

Methods

from :: Mixed sh (Shaped sh' a) -> Rep (Mixed sh (Shaped sh' a)) x #

to :: Rep (Mixed sh (Shaped sh' a)) x -> Mixed sh (Shaped sh' a) #

Generic (Mixed sh (a, b)) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type Rep (Mixed sh (a, b)) 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh (a, b)) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'False) (C1 ('MetaCons "M_Tup2" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Mixed sh a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Mixed sh b))))

Methods

from :: Mixed sh (a, b) -> Rep (Mixed sh (a, b)) x #

to :: Rep (Mixed sh (a, b)) x -> Mixed sh (a, b) #

Generic (Mixed sh ()) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type Rep (Mixed sh ()) 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh ()) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Nil" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Primitive ())))))

Methods

from :: Mixed sh () -> Rep (Mixed sh ()) x #

to :: Rep (Mixed sh ()) x -> Mixed sh () #

Generic (Mixed sh Bool) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type Rep (Mixed sh Bool) 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh Bool) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Bool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Primitive Bool)))))

Methods

from :: Mixed sh Bool -> Rep (Mixed sh Bool) x #

to :: Rep (Mixed sh Bool) x -> Mixed sh Bool #

Generic (Mixed sh Double) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type Rep (Mixed sh Double) 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh Double) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Double" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Primitive Double)))))

Methods

from :: Mixed sh Double -> Rep (Mixed sh Double) x #

to :: Rep (Mixed sh Double) x -> Mixed sh Double #

Generic (Mixed sh Float) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type Rep (Mixed sh Float) 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh Float) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Float" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Primitive Float)))))

Methods

from :: Mixed sh Float -> Rep (Mixed sh Float) x #

to :: Rep (Mixed sh Float) x -> Mixed sh Float #

Generic (Mixed sh Int) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type Rep (Mixed sh Int) 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh Int) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Int" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Primitive Int)))))

Methods

from :: Mixed sh Int -> Rep (Mixed sh Int) x #

to :: Rep (Mixed sh Int) x -> Mixed sh Int #

Generic (Mixed sh1 (Mixed sh2 a)) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type Rep (Mixed sh1 (Mixed sh2 a)) 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh1 (Mixed sh2 a)) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'False) (C1 ('MetaCons "M_Nest" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (IShX sh1)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Mixed (sh1 ++ sh2) a))))

Methods

from :: Mixed sh1 (Mixed sh2 a) -> Rep (Mixed sh1 (Mixed sh2 a)) x #

to :: Rep (Mixed sh1 (Mixed sh2 a)) x -> Mixed sh1 (Mixed sh2 a) #

(NumElt a, PrimElt a) => Num (Mixed sh a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

(+) :: Mixed sh a -> Mixed sh a -> Mixed sh a #

(-) :: Mixed sh a -> Mixed sh a -> Mixed sh a #

(*) :: Mixed sh a -> Mixed sh a -> Mixed sh a #

negate :: Mixed sh a -> Mixed sh a #

abs :: Mixed sh a -> Mixed sh a #

signum :: Mixed sh a -> Mixed sh a #

fromInteger :: Integer -> Mixed sh a #

(FloatElt a, PrimElt a) => Fractional (Mixed sh a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

(/) :: Mixed sh a -> Mixed sh a -> Mixed sh a #

recip :: Mixed sh a -> Mixed sh a #

fromRational :: Rational -> Mixed sh a #

(Show a, Elt a) => Show (Mixed sh a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

showsPrec :: Int -> Mixed sh a -> ShowS #

show :: Mixed sh a -> String #

showList :: [Mixed sh a] -> ShowS #

Elt a => NFData (Mixed sh a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

rnf :: Mixed sh a -> () #

Eq (Mixed sh CInt) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

(==) :: Mixed sh CInt -> Mixed sh CInt -> Bool #

(/=) :: Mixed sh CInt -> Mixed sh CInt -> Bool #

Eq (Mixed sh Int32) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

(==) :: Mixed sh Int32 -> Mixed sh Int32 -> Bool #

(/=) :: Mixed sh Int32 -> Mixed sh Int32 -> Bool #

Eq (Mixed sh Int64) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

(==) :: Mixed sh Int64 -> Mixed sh Int64 -> Bool #

(/=) :: Mixed sh Int64 -> Mixed sh Int64 -> Bool #

(Eq a, Storable a) => Eq (Mixed sh (Primitive a)) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

(==) :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Bool #

(/=) :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Bool #

Eq (Mixed sh (Mixed (Replicate n ('Nothing :: Maybe Nat)) a)) => Eq (Mixed sh (Ranked n a)) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

Methods

(==) :: Mixed sh (Ranked n a) -> Mixed sh (Ranked n a) -> Bool #

(/=) :: Mixed sh (Ranked n a) -> Mixed sh (Ranked n a) -> Bool #

Eq (Mixed sh (Mixed (MapJust sh') a)) => Eq (Mixed sh (Shaped sh' a)) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

Methods

(==) :: Mixed sh (Shaped sh' a) -> Mixed sh (Shaped sh' a) -> Bool #

(/=) :: Mixed sh (Shaped sh' a) -> Mixed sh (Shaped sh' a) -> Bool #

(Eq (Mixed sh a), Eq (Mixed sh b)) => Eq (Mixed sh (a, b)) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

(==) :: Mixed sh (a, b) -> Mixed sh (a, b) -> Bool #

(/=) :: Mixed sh (a, b) -> Mixed sh (a, b) -> Bool #

Eq (Mixed sh ()) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

(==) :: Mixed sh () -> Mixed sh () -> Bool #

(/=) :: Mixed sh () -> Mixed sh () -> Bool #

Eq (Mixed sh Bool) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

(==) :: Mixed sh Bool -> Mixed sh Bool -> Bool #

(/=) :: Mixed sh Bool -> Mixed sh Bool -> Bool #

Eq (Mixed sh Double) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

(==) :: Mixed sh Double -> Mixed sh Double -> Bool #

(/=) :: Mixed sh Double -> Mixed sh Double -> Bool #

Eq (Mixed sh Float) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

(==) :: Mixed sh Float -> Mixed sh Float -> Bool #

(/=) :: Mixed sh Float -> Mixed sh Float -> Bool #

Eq (Mixed sh Int) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

(==) :: Mixed sh Int -> Mixed sh Int -> Bool #

(/=) :: Mixed sh Int -> Mixed sh Int -> Bool #

Eq (Mixed (sh1 ++ sh2) a) => Eq (Mixed sh1 (Mixed sh2 a)) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

(==) :: Mixed sh1 (Mixed sh2 a) -> Mixed sh1 (Mixed sh2 a) -> Bool #

(/=) :: Mixed sh1 (Mixed sh2 a) -> Mixed sh1 (Mixed sh2 a) -> Bool #

Ord (Mixed sh CInt) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

compare :: Mixed sh CInt -> Mixed sh CInt -> Ordering #

(<) :: Mixed sh CInt -> Mixed sh CInt -> Bool #

(<=) :: Mixed sh CInt -> Mixed sh CInt -> Bool #

(>) :: Mixed sh CInt -> Mixed sh CInt -> Bool #

(>=) :: Mixed sh CInt -> Mixed sh CInt -> Bool #

max :: Mixed sh CInt -> Mixed sh CInt -> Mixed sh CInt #

min :: Mixed sh CInt -> Mixed sh CInt -> Mixed sh CInt #

Ord (Mixed sh Int32) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

compare :: Mixed sh Int32 -> Mixed sh Int32 -> Ordering #

(<) :: Mixed sh Int32 -> Mixed sh Int32 -> Bool #

(<=) :: Mixed sh Int32 -> Mixed sh Int32 -> Bool #

(>) :: Mixed sh Int32 -> Mixed sh Int32 -> Bool #

(>=) :: Mixed sh Int32 -> Mixed sh Int32 -> Bool #

max :: Mixed sh Int32 -> Mixed sh Int32 -> Mixed sh Int32 #

min :: Mixed sh Int32 -> Mixed sh Int32 -> Mixed sh Int32 #

Ord (Mixed sh Int64) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

compare :: Mixed sh Int64 -> Mixed sh Int64 -> Ordering #

(<) :: Mixed sh Int64 -> Mixed sh Int64 -> Bool #

(<=) :: Mixed sh Int64 -> Mixed sh Int64 -> Bool #

(>) :: Mixed sh Int64 -> Mixed sh Int64 -> Bool #

(>=) :: Mixed sh Int64 -> Mixed sh Int64 -> Bool #

max :: Mixed sh Int64 -> Mixed sh Int64 -> Mixed sh Int64 #

min :: Mixed sh Int64 -> Mixed sh Int64 -> Mixed sh Int64 #

(Ord a, Storable a) => Ord (Mixed sh (Primitive a)) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

compare :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Ordering #

(<) :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Bool #

(<=) :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Bool #

(>) :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Bool #

(>=) :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Bool #

max :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Mixed sh (Primitive a) #

min :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Mixed sh (Primitive a) #

(Ord (Mixed sh a), Ord (Mixed sh b)) => Ord (Mixed sh (a, b)) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

compare :: Mixed sh (a, b) -> Mixed sh (a, b) -> Ordering #

(<) :: Mixed sh (a, b) -> Mixed sh (a, b) -> Bool #

(<=) :: Mixed sh (a, b) -> Mixed sh (a, b) -> Bool #

(>) :: Mixed sh (a, b) -> Mixed sh (a, b) -> Bool #

(>=) :: Mixed sh (a, b) -> Mixed sh (a, b) -> Bool #

max :: Mixed sh (a, b) -> Mixed sh (a, b) -> Mixed sh (a, b) #

min :: Mixed sh (a, b) -> Mixed sh (a, b) -> Mixed sh (a, b) #

Ord (Mixed sh ()) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

compare :: Mixed sh () -> Mixed sh () -> Ordering #

(<) :: Mixed sh () -> Mixed sh () -> Bool #

(<=) :: Mixed sh () -> Mixed sh () -> Bool #

(>) :: Mixed sh () -> Mixed sh () -> Bool #

(>=) :: Mixed sh () -> Mixed sh () -> Bool #

max :: Mixed sh () -> Mixed sh () -> Mixed sh () #

min :: Mixed sh () -> Mixed sh () -> Mixed sh () #

Ord (Mixed sh Bool) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

compare :: Mixed sh Bool -> Mixed sh Bool -> Ordering #

(<) :: Mixed sh Bool -> Mixed sh Bool -> Bool #

(<=) :: Mixed sh Bool -> Mixed sh Bool -> Bool #

(>) :: Mixed sh Bool -> Mixed sh Bool -> Bool #

(>=) :: Mixed sh Bool -> Mixed sh Bool -> Bool #

max :: Mixed sh Bool -> Mixed sh Bool -> Mixed sh Bool #

min :: Mixed sh Bool -> Mixed sh Bool -> Mixed sh Bool #

Ord (Mixed sh Double) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

compare :: Mixed sh Double -> Mixed sh Double -> Ordering #

(<) :: Mixed sh Double -> Mixed sh Double -> Bool #

(<=) :: Mixed sh Double -> Mixed sh Double -> Bool #

(>) :: Mixed sh Double -> Mixed sh Double -> Bool #

(>=) :: Mixed sh Double -> Mixed sh Double -> Bool #

max :: Mixed sh Double -> Mixed sh Double -> Mixed sh Double #

min :: Mixed sh Double -> Mixed sh Double -> Mixed sh Double #

Ord (Mixed sh Float) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

compare :: Mixed sh Float -> Mixed sh Float -> Ordering #

(<) :: Mixed sh Float -> Mixed sh Float -> Bool #

(<=) :: Mixed sh Float -> Mixed sh Float -> Bool #

(>) :: Mixed sh Float -> Mixed sh Float -> Bool #

(>=) :: Mixed sh Float -> Mixed sh Float -> Bool #

max :: Mixed sh Float -> Mixed sh Float -> Mixed sh Float #

min :: Mixed sh Float -> Mixed sh Float -> Mixed sh Float #

Ord (Mixed sh Int) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

compare :: Mixed sh Int -> Mixed sh Int -> Ordering #

(<) :: Mixed sh Int -> Mixed sh Int -> Bool #

(<=) :: Mixed sh Int -> Mixed sh Int -> Bool #

(>) :: Mixed sh Int -> Mixed sh Int -> Bool #

(>=) :: Mixed sh Int -> Mixed sh Int -> Bool #

max :: Mixed sh Int -> Mixed sh Int -> Mixed sh Int #

min :: Mixed sh Int -> Mixed sh Int -> Mixed sh Int #

Ord (Mixed (sh1 ++ sh2) a) => Ord (Mixed sh1 (Mixed sh2 a)) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

compare :: Mixed sh1 (Mixed sh2 a) -> Mixed sh1 (Mixed sh2 a) -> Ordering #

(<) :: Mixed sh1 (Mixed sh2 a) -> Mixed sh1 (Mixed sh2 a) -> Bool #

(<=) :: Mixed sh1 (Mixed sh2 a) -> Mixed sh1 (Mixed sh2 a) -> Bool #

(>) :: Mixed sh1 (Mixed sh2 a) -> Mixed sh1 (Mixed sh2 a) -> Bool #

(>=) :: Mixed sh1 (Mixed sh2 a) -> Mixed sh1 (Mixed sh2 a) -> Bool #

max :: Mixed sh1 (Mixed sh2 a) -> Mixed sh1 (Mixed sh2 a) -> Mixed sh1 (Mixed sh2 a) #

min :: Mixed sh1 (Mixed sh2 a) -> Mixed sh1 (Mixed sh2 a) -> Mixed sh1 (Mixed sh2 a) #

Elt a => Elt (Mixed sh' a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type ShapeTree (Mixed sh' a) 
Instance details

Defined in Data.Array.Nested.Mixed

type ShapeTree (Mixed sh' a) = (IShX sh', ShapeTree a)

Methods

mshape :: forall (sh :: [Maybe Nat]). Mixed sh (Mixed sh' a) -> IShX sh Source #

mindex :: forall (sh :: [Maybe Nat]). Mixed sh (Mixed sh' a) -> IIxX sh -> Mixed sh' a Source #

mindexPartial :: forall (sh :: [Maybe Nat]) (sh'0 :: [Maybe Nat]). Mixed (sh ++ sh'0) (Mixed sh' a) -> IIxX sh -> Mixed sh'0 (Mixed sh' a) Source #

mscalar :: Mixed sh' a -> Mixed ('[] :: [Maybe Nat]) (Mixed sh' a) Source #

mfromListOuter :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed sh (Mixed sh' a)) -> Mixed (('Nothing :: Maybe Nat) ': sh) (Mixed sh' a) Source #

mtoListOuter :: forall (n :: Maybe Nat) (sh :: [Maybe Nat]). Mixed (n ': sh) (Mixed sh' a) -> [Mixed sh (Mixed sh' a)] Source #

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh'0 :: [Maybe Nat]) b. Storable b => StaticShX sh'0 -> XArray (sh1 ++ sh'0) b -> XArray (sh2 ++ sh'0) b) -> Mixed sh1 (Mixed sh' a) -> Mixed sh2 (Mixed sh' a) Source #

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). StaticShX sh3 -> (forall (sh'0 :: [Maybe Nat]) b. Storable b => StaticShX sh'0 -> XArray (sh1 ++ sh'0) b -> XArray (sh2 ++ sh'0) b -> XArray (sh3 ++ sh'0) b) -> Mixed sh1 (Mixed sh' a) -> Mixed sh2 (Mixed sh' a) -> Mixed sh3 (Mixed sh' a) Source #

mliftL :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh'0 :: [Maybe Nat]) b. Storable b => StaticShX sh'0 -> NonEmpty (XArray (sh1 ++ sh'0) b) -> NonEmpty (XArray (sh2 ++ sh'0) b)) -> NonEmpty (Mixed sh1 (Mixed sh' a)) -> NonEmpty (Mixed sh2 (Mixed sh' a)) Source #

mcastPartial :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh'0 :: [Maybe Nat]). Rank sh1 ~ Rank sh2 => StaticShX sh1 -> StaticShX sh2 -> Proxy sh'0 -> Mixed (sh1 ++ sh'0) (Mixed sh' a) -> Mixed (sh2 ++ sh'0) (Mixed sh' a) Source #

mtranspose :: forall (is :: [Natural]) (sh :: [Maybe Nat]). (IsPermutation is, Rank is <= Rank sh) => Perm is -> Mixed sh (Mixed sh' a) -> Mixed (PermutePrefix is sh) (Mixed sh' a) Source #

mconcat :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh) (Mixed sh' a)) -> Mixed (('Nothing :: Maybe Nat) ': sh) (Mixed sh' a) Source #

mrnf :: forall (sh :: [Maybe Nat]). Mixed sh (Mixed sh' a) -> () Source #

mshapeTree :: Mixed sh' a -> ShapeTree (Mixed sh' a) Source #

mshapeTreeEq :: Proxy (Mixed sh' a) -> ShapeTree (Mixed sh' a) -> ShapeTree (Mixed sh' a) -> Bool Source #

mshapeTreeEmpty :: Proxy (Mixed sh' a) -> ShapeTree (Mixed sh' a) -> Bool Source #

mshowShapeTree :: Proxy (Mixed sh' a) -> ShapeTree (Mixed sh' a) -> String Source #

marrayStrides :: forall (sh :: [Maybe Nat]). Mixed sh (Mixed sh' a) -> Bag [Int] Source #

mvecsWrite :: forall (sh :: [Maybe Nat]) s. IShX sh -> IIxX sh -> Mixed sh' a -> MixedVecs s sh (Mixed sh' a) -> ST s () Source #

mvecsWritePartial :: forall (sh :: [Maybe Nat]) (sh'0 :: [Maybe Nat]) s. IShX (sh ++ sh'0) -> IIxX sh -> Mixed sh'0 (Mixed sh' a) -> MixedVecs s (sh ++ sh'0) (Mixed sh' a) -> ST s () Source #

mvecsFreeze :: forall (sh :: [Maybe Nat]) s. IShX sh -> MixedVecs s sh (Mixed sh' a) -> ST s (Mixed sh (Mixed sh' a)) Source #

(KnownShX sh', KnownElt a) => KnownElt (Mixed sh' a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

memptyArrayUnsafe :: forall (sh :: [Maybe Nat]). IShX sh -> Mixed sh (Mixed sh' a) Source #

mvecsUnsafeNew :: forall (sh :: [Maybe Nat]) s. IShX sh -> Mixed sh' a -> ST s (MixedVecs s sh (Mixed sh' a)) Source #

mvecsNewEmpty :: forall s (sh :: [Maybe Nat]). Proxy (Mixed sh' a) -> ST s (MixedVecs s sh (Mixed sh' a)) Source #

newtype Mixed sh CInt Source # 
Instance details

Defined in Data.Array.Nested.Mixed

newtype Mixed sh CInt = M_CInt (Mixed sh (Primitive CInt))
newtype Mixed sh Int32 Source # 
Instance details

Defined in Data.Array.Nested.Mixed

newtype Mixed sh Int32 = M_Int32 (Mixed sh (Primitive Int32))
newtype Mixed sh Int64 Source # 
Instance details

Defined in Data.Array.Nested.Mixed

newtype Mixed sh Int64 = M_Int64 (Mixed sh (Primitive Int64))
newtype Mixed sh () Source # 
Instance details

Defined in Data.Array.Nested.Mixed

newtype Mixed sh () = M_Nil (Mixed sh (Primitive ()))
newtype Mixed sh Bool Source # 
Instance details

Defined in Data.Array.Nested.Mixed

newtype Mixed sh Bool = M_Bool (Mixed sh (Primitive Bool))
newtype Mixed sh Double Source # 
Instance details

Defined in Data.Array.Nested.Mixed

newtype Mixed sh Float Source # 
Instance details

Defined in Data.Array.Nested.Mixed

newtype Mixed sh Float = M_Float (Mixed sh (Primitive Float))
newtype Mixed sh Int Source # 
Instance details

Defined in Data.Array.Nested.Mixed

newtype Mixed sh Int = M_Int (Mixed sh (Primitive Int))
data MixedVecs s sh1 (Mixed sh2 a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

data MixedVecs s sh1 (Mixed sh2 a) = MV_Nest !(IShX sh2) !(MixedVecs s (sh1 ++ sh2) a)
data Mixed sh (Primitive a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

data Mixed sh (Primitive a) = M_Primitive !(IShX sh) !(XArray sh a)
newtype Mixed sh (Ranked n a) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

newtype Mixed sh (Ranked n a) = M_Ranked (Mixed sh (Mixed (Replicate n ('Nothing :: Maybe Nat)) a))
newtype Mixed sh (Shaped sh' a) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

newtype Mixed sh (Shaped sh' a) = M_Shaped (Mixed sh (Mixed (MapJust sh') a))
data Mixed sh (a, b) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

data Mixed sh (a, b) = M_Tup2 !(Mixed sh a) !(Mixed sh b)
data Mixed sh1 (Mixed sh2 a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

data Mixed sh1 (Mixed sh2 a) = M_Nest !(IShX sh1) !(Mixed (sh1 ++ sh2) a)
type Rep (Mixed sh CInt) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh CInt) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_CInt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Primitive CInt)))))
type Rep (Mixed sh Int32) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh Int32) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Int32" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Primitive Int32)))))
type Rep (Mixed sh Int64) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh Int64) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Int64" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Primitive Int64)))))
type Rep (Mixed sh (Primitive a)) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh (Primitive a)) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'False) (C1 ('MetaCons "M_Primitive" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (IShX sh)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (XArray sh a))))
type Rep (Mixed sh (Ranked n a)) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

type Rep (Mixed sh (Ranked n a)) = D1 ('MetaData "Mixed" "Data.Array.Nested.Ranked.Base" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Ranked" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Mixed (Replicate n ('Nothing :: Maybe Nat)) a)))))
type Rep (Mixed sh (Shaped sh' a)) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

type Rep (Mixed sh (Shaped sh' a)) = D1 ('MetaData "Mixed" "Data.Array.Nested.Shaped.Base" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Shaped" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Mixed (MapJust sh') a)))))
type Rep (Mixed sh (a, b)) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh (a, b)) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'False) (C1 ('MetaCons "M_Tup2" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Mixed sh a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Mixed sh b))))
type Rep (Mixed sh ()) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh ()) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Nil" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Primitive ())))))
type Rep (Mixed sh Bool) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh Bool) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Bool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Primitive Bool)))))
type Rep (Mixed sh Double) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh Double) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Double" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Primitive Double)))))
type Rep (Mixed sh Float) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh Float) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Float" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Primitive Float)))))
type Rep (Mixed sh Int) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh Int) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "M_Int" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Mixed sh (Primitive Int)))))
type Rep (Mixed sh1 (Mixed sh2 a)) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh1 (Mixed sh2 a)) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'False) (C1 ('MetaCons "M_Nest" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (IShX sh1)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Mixed (sh1 ++ sh2) a))))
type ShapeTree (Mixed sh' a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

type ShapeTree (Mixed sh' a) = (IShX sh', ShapeTree a)

data ListX (sh :: [Maybe Nat]) (f :: Maybe Nat -> Type) where Source #

Constructors

ZX :: forall (f :: Maybe Nat -> Type). ListX ('[] :: [Maybe Nat]) f 
(::%) :: forall (f :: Maybe Nat -> Type) (n :: Maybe Nat) (sh1 :: [Maybe Nat]). f n -> ListX sh1 f -> ListX (n ': sh1) f infixr 3 

Instances

Instances details
KnownShX sh => IsList (ListX sh (Const i :: Maybe Nat -> Type)) Source #

Very untyped: only length is checked (at runtime).

Instance details

Defined in Data.Array.Nested.Mixed.Shape

Associated Types

type Item (ListX sh (Const i :: Maybe Nat -> Type)) 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

type Item (ListX sh (Const i :: Maybe Nat -> Type)) = i

Methods

fromList :: [Item (ListX sh (Const i :: Maybe Nat -> Type))] -> ListX sh (Const i :: Maybe Nat -> Type) #

fromListN :: Int -> [Item (ListX sh (Const i :: Maybe Nat -> Type))] -> ListX sh (Const i :: Maybe Nat -> Type) #

toList :: ListX sh (Const i :: Maybe Nat -> Type) -> [Item (ListX sh (Const i :: Maybe Nat -> Type))] #

(forall (n :: Maybe Nat). Show (f n)) => Show (ListX sh f) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

showsPrec :: Int -> ListX sh f -> ShowS #

show :: ListX sh f -> String #

showList :: [ListX sh f] -> ShowS #

(forall (n :: Maybe Nat). NFData (f n)) => NFData (ListX sh f) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

rnf :: ListX sh f -> () #

(forall (n :: Maybe Nat). Eq (f n)) => Eq (ListX sh f) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

(==) :: ListX sh f -> ListX sh f -> Bool #

(/=) :: ListX sh f -> ListX sh f -> Bool #

(forall (n :: Maybe Nat). Ord (f n)) => Ord (ListX sh f) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

compare :: ListX sh f -> ListX sh f -> Ordering #

(<) :: ListX sh f -> ListX sh f -> Bool #

(<=) :: ListX sh f -> ListX sh f -> Bool #

(>) :: ListX sh f -> ListX sh f -> Bool #

(>=) :: ListX sh f -> ListX sh f -> Bool #

max :: ListX sh f -> ListX sh f -> ListX sh f #

min :: ListX sh f -> ListX sh f -> ListX sh f #

type Item (ListX sh (Const i :: Maybe Nat -> Type)) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

type Item (ListX sh (Const i :: Maybe Nat -> Type)) = i

newtype IxX (sh :: [Maybe Nat]) i Source #

An index into a mixed-typed array.

Constructors

IxX (ListX sh (Const i :: Maybe Nat -> Type)) 

Bundled Patterns

pattern ZIX :: () => sh ~ ('[] :: [Maybe Nat]) => IxX sh i 
pattern (:.%) :: forall {sh1} {i} (n :: Maybe Nat) sh. () => forall. (n ': sh) ~ sh1 => i -> IxX sh i -> IxX sh1 i infixr 3 

Instances

Instances details
Foldable (IxX sh) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

fold :: Monoid m => IxX sh m -> m #

foldMap :: Monoid m => (a -> m) -> IxX sh a -> m #

foldMap' :: Monoid m => (a -> m) -> IxX sh a -> m #

foldr :: (a -> b -> b) -> b -> IxX sh a -> b #

foldr' :: (a -> b -> b) -> b -> IxX sh a -> b #

foldl :: (b -> a -> b) -> b -> IxX sh a -> b #

foldl' :: (b -> a -> b) -> b -> IxX sh a -> b #

foldr1 :: (a -> a -> a) -> IxX sh a -> a #

foldl1 :: (a -> a -> a) -> IxX sh a -> a #

toList :: IxX sh a -> [a] #

null :: IxX sh a -> Bool #

length :: IxX sh a -> Int #

elem :: Eq a => a -> IxX sh a -> Bool #

maximum :: Ord a => IxX sh a -> a #

minimum :: Ord a => IxX sh a -> a #

sum :: Num a => IxX sh a -> a #

product :: Num a => IxX sh a -> a #

Functor (IxX sh) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

fmap :: (a -> b) -> IxX sh a -> IxX sh b #

(<$) :: a -> IxX sh b -> IxX sh a #

Generic (IxX sh i) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Associated Types

type Rep (IxX sh i) 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

type Rep (IxX sh i) = D1 ('MetaData "IxX" "Data.Array.Nested.Mixed.Shape" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "IxX" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListX sh (Const i :: Maybe Nat -> Type)))))

Methods

from :: IxX sh i -> Rep (IxX sh i) x #

to :: Rep (IxX sh i) x -> IxX sh i #

KnownShX sh => IsList (IxX sh i) Source #

Very untyped: only length is checked (at runtime), index bounds are not checked.

Instance details

Defined in Data.Array.Nested.Mixed.Shape

Associated Types

type Item (IxX sh i) 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

type Item (IxX sh i) = i

Methods

fromList :: [Item (IxX sh i)] -> IxX sh i #

fromListN :: Int -> [Item (IxX sh i)] -> IxX sh i #

toList :: IxX sh i -> [Item (IxX sh i)] #

Show i => Show (IxX sh i) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

showsPrec :: Int -> IxX sh i -> ShowS #

show :: IxX sh i -> String #

showList :: [IxX sh i] -> ShowS #

NFData i => NFData (IxX sh i) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

rnf :: IxX sh i -> () #

Eq i => Eq (IxX sh i) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

(==) :: IxX sh i -> IxX sh i -> Bool #

(/=) :: IxX sh i -> IxX sh i -> Bool #

Ord i => Ord (IxX sh i) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

compare :: IxX sh i -> IxX sh i -> Ordering #

(<) :: IxX sh i -> IxX sh i -> Bool #

(<=) :: IxX sh i -> IxX sh i -> Bool #

(>) :: IxX sh i -> IxX sh i -> Bool #

(>=) :: IxX sh i -> IxX sh i -> Bool #

max :: IxX sh i -> IxX sh i -> IxX sh i #

min :: IxX sh i -> IxX sh i -> IxX sh i #

type Rep (IxX sh i) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

type Rep (IxX sh i) = D1 ('MetaData "IxX" "Data.Array.Nested.Mixed.Shape" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "IxX" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListX sh (Const i :: Maybe Nat -> Type)))))
type Item (IxX sh i) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

type Item (IxX sh i) = i

type IIxX (sh :: [Maybe Nat]) = IxX sh Int Source #

newtype ShX (sh :: [Maybe Nat]) i Source #

This is a newtype over ListX.

Constructors

ShX (ListX sh (SMayNat i SNat)) 

Bundled Patterns

pattern ZSX :: () => sh ~ ('[] :: [Maybe Nat]) => ShX sh i 
pattern (:$%) :: forall {sh1} {i} (n :: Maybe Nat) sh. () => (n ': sh) ~ sh1 => SMayNat i SNat n -> ShX sh i -> ShX sh1 i infixr 3 

Instances

Instances details
Functor (ShX sh) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

fmap :: (a -> b) -> ShX sh a -> ShX sh b #

(<$) :: a -> ShX sh b -> ShX sh a #

Generic (ShX sh i) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Associated Types

type Rep (ShX sh i) 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

type Rep (ShX sh i) = D1 ('MetaData "ShX" "Data.Array.Nested.Mixed.Shape" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "ShX" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListX sh (SMayNat i SNat)))))

Methods

from :: ShX sh i -> Rep (ShX sh i) x #

to :: Rep (ShX sh i) x -> ShX sh i #

KnownShX sh => IsList (ShX sh Int) Source #

Untyped: length and known dimensions are checked (at runtime).

Instance details

Defined in Data.Array.Nested.Mixed.Shape

Associated Types

type Item (ShX sh Int) 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

type Item (ShX sh Int) = Int

Methods

fromList :: [Item (ShX sh Int)] -> ShX sh Int #

fromListN :: Int -> [Item (ShX sh Int)] -> ShX sh Int #

toList :: ShX sh Int -> [Item (ShX sh Int)] #

Show i => Show (ShX sh i) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

showsPrec :: Int -> ShX sh i -> ShowS #

show :: ShX sh i -> String #

showList :: [ShX sh i] -> ShowS #

NFData i => NFData (ShX sh i) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

rnf :: ShX sh i -> () #

Eq i => Eq (ShX sh i) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

(==) :: ShX sh i -> ShX sh i -> Bool #

(/=) :: ShX sh i -> ShX sh i -> Bool #

Ord i => Ord (ShX sh i) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

compare :: ShX sh i -> ShX sh i -> Ordering #

(<) :: ShX sh i -> ShX sh i -> Bool #

(<=) :: ShX sh i -> ShX sh i -> Bool #

(>) :: ShX sh i -> ShX sh i -> Bool #

(>=) :: ShX sh i -> ShX sh i -> Bool #

max :: ShX sh i -> ShX sh i -> ShX sh i #

min :: ShX sh i -> ShX sh i -> ShX sh i #

type Rep (ShX sh i) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

type Rep (ShX sh i) = D1 ('MetaData "ShX" "Data.Array.Nested.Mixed.Shape" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'True) (C1 ('MetaCons "ShX" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListX sh (SMayNat i SNat)))))
type Item (ShX sh Int) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

type Item (ShX sh Int) = Int

class KnownShX (sh :: [Maybe Nat]) where Source #

Evidence for the static part of a shape. This pops up only when you are polymorphic in the element type of an array.

Methods

knownShX :: StaticShX sh Source #

Instances

Instances details
KnownShX ('[] :: [Maybe Nat]) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

knownShX :: StaticShX ('[] :: [Maybe Nat]) Source #

(KnownNat n, KnownShX sh) => KnownShX ('Just n ': sh) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

knownShX :: StaticShX ('Just n ': sh) Source #

KnownShX sh => KnownShX (('Nothing :: Maybe Nat) ': sh) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

knownShX :: StaticShX (('Nothing :: Maybe Nat) ': sh) Source #

type IShX (sh :: [Maybe Nat]) = ShX sh Int Source #

newtype StaticShX (sh :: [Maybe Nat]) Source #

The part of a shape that is statically known. (A newtype over ListX.)

Constructors

StaticShX (ListX sh (SMayNat () SNat)) 

Bundled Patterns

pattern ZKX :: () => sh ~ ('[] :: [Maybe Nat]) => StaticShX sh 
pattern (:!%) :: forall {sh1} (n :: Maybe Nat) sh. () => (n ': sh) ~ sh1 => SMayNat () SNat n -> StaticShX sh -> StaticShX sh1 infixr 3 

Instances

Instances details
Show (StaticShX sh) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

showsPrec :: Int -> StaticShX sh -> ShowS #

show :: StaticShX sh -> String #

showList :: [StaticShX sh] -> ShowS #

NFData (StaticShX sh) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

rnf :: StaticShX sh -> () #

Eq (StaticShX sh) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

(==) :: StaticShX sh -> StaticShX sh -> Bool #

(/=) :: StaticShX sh -> StaticShX sh -> Bool #

Ord (StaticShX sh) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

compare :: StaticShX sh -> StaticShX sh -> Ordering #

(<) :: StaticShX sh -> StaticShX sh -> Bool #

(<=) :: StaticShX sh -> StaticShX sh -> Bool #

(>) :: StaticShX sh -> StaticShX sh -> Bool #

(>=) :: StaticShX sh -> StaticShX sh -> Bool #

max :: StaticShX sh -> StaticShX sh -> StaticShX sh #

min :: StaticShX sh -> StaticShX sh -> StaticShX sh #

TestEquality StaticShX Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

testEquality :: forall (a :: [Maybe Nat]) (b :: [Maybe Nat]). StaticShX a -> StaticShX b -> Maybe (a :~: b) #

data SMayNat i (f :: k -> Type) (n :: Maybe k) where Source #

Constructors

SUnknown :: forall {k} i (f :: k -> Type). i -> SMayNat i f ('Nothing :: Maybe k) 
SKnown :: forall {k} (f :: k -> Type) (n1 :: k) i. f n1 -> SMayNat i f ('Just n1) 

Instances

Instances details
TestEquality f => TestEquality (SMayNat i f :: Maybe k -> Type) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

testEquality :: forall (a :: Maybe k) (b :: Maybe k). SMayNat i f a -> SMayNat i f b -> Maybe (a :~: b) #

(Show i, forall (m :: k). Show (f m)) => Show (SMayNat i f n) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

showsPrec :: Int -> SMayNat i f n -> ShowS #

show :: SMayNat i f n -> String #

showList :: [SMayNat i f n] -> ShowS #

(NFData i, forall (m :: k). NFData (f m)) => NFData (SMayNat i f n) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

rnf :: SMayNat i f n -> () #

(Eq i, forall (m :: k). Eq (f m)) => Eq (SMayNat i f n) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

(==) :: SMayNat i f n -> SMayNat i f n -> Bool #

(/=) :: SMayNat i f n -> SMayNat i f n -> Bool #

(Ord i, forall (m :: k). Ord (f m)) => Ord (SMayNat i f n) Source # 
Instance details

Defined in Data.Array.Nested.Mixed.Shape

Methods

compare :: SMayNat i f n -> SMayNat i f n -> Ordering #

(<) :: SMayNat i f n -> SMayNat i f n -> Bool #

(<=) :: SMayNat i f n -> SMayNat i f n -> Bool #

(>) :: SMayNat i f n -> SMayNat i f n -> Bool #

(>=) :: SMayNat i f n -> SMayNat i f n -> Bool #

max :: SMayNat i f n -> SMayNat i f n -> SMayNat i f n #

min :: SMayNat i f n -> SMayNat i f n -> SMayNat i f n #

mshape :: forall (sh :: [Maybe Nat]). Elt a => Mixed sh a -> IShX sh Source #

mrank :: forall a (sh :: [Maybe Nat]). Elt a => Mixed sh a -> SNat (Rank sh) Source #

msize :: forall a (sh :: [Maybe Nat]). Elt a => Mixed sh a -> Int Source #

The total number of elements in the array.

mindex :: forall (sh :: [Maybe Nat]). Elt a => Mixed sh a -> IIxX sh -> a Source #

mindexPartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]). Elt a => Mixed (sh ++ sh') a -> IIxX sh -> Mixed sh' a Source #

mgenerate :: forall (sh :: [Maybe Nat]) a. KnownElt a => IShX sh -> (IIxX sh -> a) -> Mixed sh a Source #

Create an array given a size and a function that computes the element at a given index.

WARNING: It is required that every a returned by the argument to mgenerate has the same shape. For example, the following will throw a runtime error:

foo :: Mixed [Nothing] (Mixed [Nothing] Double)
foo = mgenerate (10 :.: ZIR) $ \(i :.: ZIR) ->
        mgenerate (i :.: ZIR) $ \(j :.: ZIR) ->
          ...

because the size of the inner mgenerate is not always the same (it depends on i). Nested arrays in ox-arrays are always stored fully flattened, so the entire hierarchy (after distributing out tuples) must be a rectangular array. The type of mgenerate allows this requirement to be broken very easily, hence the runtime check.

msumOuter1 :: forall (sh :: [Maybe Nat]) (n :: Maybe Nat) a. (NumElt a, PrimElt a) => Mixed (n ': sh) a -> Mixed sh a Source #

msumAllPrim :: forall a (sh :: [Maybe Nat]). (PrimElt a, NumElt a) => Mixed sh a -> a Source #

mtranspose :: forall (is :: [Natural]) (sh :: [Maybe Nat]). (Elt a, IsPermutation is, Rank is <= Rank sh) => Perm is -> Mixed sh a -> Mixed (PermutePrefix is sh) a Source #

mappend :: forall (n :: Maybe Nat) (m :: Maybe Nat) (sh :: [Maybe Nat]) a. Elt a => Mixed (n ': sh) a -> Mixed (m ': sh) a -> Mixed (AddMaybe n m ': sh) a Source #

mconcat :: forall (sh :: [Maybe Nat]). Elt a => NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh) a) -> Mixed (('Nothing :: Maybe Nat) ': sh) a Source #

All arrays in the input must have equal shapes, including subarrays inside their elements.

mscalar :: Elt a => a -> Mixed ('[] :: [Maybe Nat]) a Source #

mfromVector :: forall (sh :: [Maybe Nat]) a. PrimElt a => IShX sh -> Vector a -> Mixed sh a Source #

mtoVector :: forall a (sh :: [Maybe Nat]). PrimElt a => Mixed sh a -> Vector a Source #

munScalar :: Elt a => Mixed ('[] :: [Maybe Nat]) a -> a Source #

memptyArray :: forall a (sh :: [Maybe Nat]). KnownElt a => IShX sh -> Mixed ('Just 0 ': sh) a Source #

mrerank :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh :: [Maybe Nat]) a b. (PrimElt a, PrimElt b) => StaticShX sh -> IShX sh2 -> (Mixed sh1 a -> Mixed sh2 b) -> Mixed (sh ++ sh1) a -> Mixed (sh ++ sh2) b Source #

See the caveats at X.rerank.

mreplicate :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) a. Elt a => IShX sh -> Mixed sh' a -> Mixed (sh ++ sh') a Source #

mreplicateScal :: forall (sh :: [Maybe Nat]) a. PrimElt a => IShX sh -> a -> Mixed sh a Source #

mfromListOuter :: forall (sh :: [Maybe Nat]). Elt a => NonEmpty (Mixed sh a) -> Mixed (('Nothing :: Maybe Nat) ': sh) a Source #

All arrays in the list, even subarrays inside a, must have the same shape; if they do not, a runtime error will be thrown. See the documentation of mgenerate for more information about this restriction. Furthermore, the length of the list must correspond with n: if n is Just m and m does not equal the length of the list, a runtime error is thrown.

Consider also mfromListPrim, which can avoid intermediate arrays.

mfromListLinear :: forall (sh :: [Maybe Nat]) a. Elt a => IShX sh -> NonEmpty a -> Mixed sh a Source #

mfromListPrimLinear :: forall a (sh :: [Maybe Nat]). PrimElt a => IShX sh -> [a] -> Mixed sh a Source #

mtoList :: forall a (n :: Maybe Nat). Elt a => Mixed '[n] a -> [a] Source #

mtoListOuter :: forall (n :: Maybe Nat) (sh :: [Maybe Nat]). Elt a => Mixed (n ': sh) a -> [Mixed sh a] Source #

mtoListLinear :: forall a (sh :: [Maybe Nat]). Elt a => Mixed sh a -> [a] Source #

mslice :: forall a (i :: Nat) (n :: Nat) (k :: Natural) (sh :: [Maybe Natural]). Elt a => SNat i -> SNat n -> Mixed ('Just ((i + n) + k) ': sh) a -> Mixed ('Just n ': sh) a Source #

mrev1 :: forall a (n :: Maybe Nat) (sh :: [Maybe Nat]). Elt a => Mixed (n ': sh) a -> Mixed (n ': sh) a Source #

mreshape :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) a. Elt a => IShX sh' -> Mixed sh a -> Mixed sh' a Source #

mflatten :: forall a (sh :: [Maybe Nat]). Elt a => Mixed sh a -> Mixed '[Flatten sh] a Source #

miota :: forall a (n :: Nat). (Enum a, PrimElt a) => SNat n -> Mixed '['Just n] a Source #

mminIndexPrim :: forall a (sh :: [Maybe Nat]). (PrimElt a, NumElt a) => Mixed sh a -> IIxX sh Source #

Throws if the array is empty.

mmaxIndexPrim :: forall a (sh :: [Maybe Nat]). (PrimElt a, NumElt a) => Mixed sh a -> IIxX sh Source #

Throws if the array is empty.

mdot1Inner :: forall (sh :: [Maybe Nat]) (n :: Maybe Nat) a. (PrimElt a, NumElt a) => Proxy n -> Mixed (sh ++ '[n]) a -> Mixed (sh ++ '[n]) a -> Mixed sh a Source #

mdot :: forall a (sh :: [Maybe Nat]). (PrimElt a, NumElt a) => Mixed sh a -> Mixed sh a -> a Source #

This has a temporary, suboptimal implementation in terms of mflatten. Prefer mdot1Inner if applicable.

mnest :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) a. Elt a => StaticShX sh -> Mixed (sh ++ sh') a -> Mixed sh (Mixed sh' a) Source #

munNest :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) a. Mixed sh (Mixed sh' a) -> Mixed (sh ++ sh') a Source #

mzip :: forall a b (sh :: [Maybe Nat]). (Elt a, Elt b) => Mixed sh a -> Mixed sh b -> Mixed sh (a, b) Source #

The arguments must have equal shapes. If they do not, an error is raised.

munzip :: forall (sh :: [Maybe Nat]) a b. Mixed sh (a, b) -> (Mixed sh a, Mixed sh b) Source #

Lifting orthotope operations to Mixed arrays

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). Elt a => StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b) -> Mixed sh1 a -> Mixed sh2 a Source #

Note: this library makes no particular guarantees about the shapes of arrays "inside" an empty array. With mlift, mlift2 and mliftL you can see the full XArray and as such you can distinguish different empty arrays by the "shapes" of their elements. This information is meaningless, so you should not use it.

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). Elt a => StaticShX sh3 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b -> XArray (sh3 ++ sh') b) -> Mixed sh1 a -> Mixed sh2 a -> Mixed sh3 a Source #

See the documentation for mlift.

Conversions

mtoXArrayPrim :: forall a (sh :: [Maybe Nat]). PrimElt a => Mixed sh a -> (IShX sh, XArray sh a) Source #

mfromXArrayPrim :: forall a (sh :: [Maybe Nat]). PrimElt a => StaticShX sh -> XArray sh a -> Mixed sh a Source #

mcast :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) a. (Rank sh1 ~ Rank sh2, Elt a) => StaticShX sh2 -> Mixed sh1 a -> Mixed sh2 a Source #

mcastToShaped :: forall (sh :: [Maybe Nat]) (sh' :: [Nat]) a. (Elt a, Rank sh ~ Rank sh') => ShS sh' -> Mixed sh a -> Shaped sh' a Source #

mtoRanked :: forall (sh :: [Maybe Nat]) a. Elt a => Mixed sh a -> Ranked (Rank sh) a Source #

convert :: (Elt a, Elt b) => Conversion a b -> a -> b Source #

data Conversion a b where Source #

The constructors that perform runtime shape checking are marked with a tick ('): ConvXS' and ConvXX'. For the other constructors, the types ensure that the shapes are already compatible. To convert between Ranked and Shaped, go via Mixed.

The guiding principle behind Conversion is that it should represent the array restructurings, or perhaps re-presentations, that do not change the underlying XArrays. This leads to the inclusion of some operations that do not look like simple conversions (casts) at first glance, like ConvZip.

Note: Haddock gleefully renames type variables in constructors so that they match the data type head as much as possible. See the source for a more readable presentation of this data type.

Constructors

ConvId :: forall a. Conversion a a 
ConvCmp :: forall b1 b a. Conversion b1 b -> Conversion a b1 -> Conversion a b 
ConvRX :: forall (n :: Nat) a1. Conversion (Ranked n a1) (Mixed (Replicate n ('Nothing :: Maybe Nat)) a1) 
ConvSX :: forall (sh :: [Nat]) a1. Conversion (Shaped sh a1) (Mixed (MapJust sh) a1) 
ConvXR :: forall a1 (sh :: [Maybe Nat]). Elt a1 => Conversion (Mixed sh a1) (Ranked (Rank sh) a1) 
ConvXS :: forall (sh :: [Nat]) a1. Conversion (Mixed (MapJust sh) a1) (Shaped sh a1) 
ConvXS' :: forall (sh :: [Maybe Nat]) (sh' :: [Nat]) a1. (Rank sh ~ Rank sh', Elt a1) => ShS sh' -> Conversion (Mixed sh a1) (Shaped sh' a1) 
ConvXX' :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) a1. (Rank sh ~ Rank sh', Elt a1) => StaticShX sh' -> Conversion (Mixed sh a1) (Mixed sh' a1) 
ConvRR :: forall a1 b1 (n :: Nat). Conversion a1 b1 -> Conversion (Ranked n a1) (Ranked n b1) 
ConvSS :: forall a1 b1 (sh :: [Nat]). Conversion a1 b1 -> Conversion (Shaped sh a1) (Shaped sh b1) 
ConvXX :: forall a1 b1 (sh :: [Maybe Nat]). Conversion a1 b1 -> Conversion (Mixed sh a1) (Mixed sh b1) 
ConvT2 :: forall a1 a' b1 b'. Conversion a1 a' -> Conversion b1 b' -> Conversion (a1, b1) (a', b') 
Conv0X :: forall a. Elt a => Conversion a (Mixed ('[] :: [Maybe Nat]) a) 
ConvX0 :: forall b. Conversion (Mixed ('[] :: [Maybe Nat]) b) b 
ConvNest :: forall a1 (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]). Elt a1 => StaticShX sh -> Conversion (Mixed (sh ++ sh') a1) (Mixed sh (Mixed sh' a1)) 
ConvUnnest :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) a1. Conversion (Mixed sh (Mixed sh' a1)) (Mixed (sh ++ sh') a1) 
ConvZip :: forall a1 b1 (sh :: [Maybe Nat]). (Elt a1, Elt b1) => Conversion (Mixed sh a1, Mixed sh b1) (Mixed sh (a1, b1)) 
ConvUnzip :: forall a1 b1 (sh :: [Maybe Nat]). (Elt a1, Elt b1) => Conversion (Mixed sh (a1, b1)) (Mixed sh a1, Mixed sh b1) 

Instances

Instances details
Category Conversion Source # 
Instance details

Defined in Data.Array.Nested.Convert

Methods

id :: Conversion a a #

(.) :: Conversion b c -> Conversion a b -> Conversion a c #

Show (Conversion a b) Source # 
Instance details

Defined in Data.Array.Nested.Convert

Methods

showsPrec :: Int -> Conversion a b -> ShowS #

show :: Conversion a b -> String #

showList :: [Conversion a b] -> ShowS #

Additional arithmetic operations

These functions are separate top-level functions, and not exposed in instances for RealFloat and Integral, because those classes include a variety of other functions that make no sense for arrays. This problem already occurs with fromInteger, fromRational and pi, but having Num, Fractional and Floating available is just too useful.

mquotArray :: forall a (sh :: [Maybe Nat]). (IntElt a, PrimElt a) => Mixed sh a -> Mixed sh a -> Mixed sh a Source #

mremArray :: forall a (sh :: [Maybe Nat]). (IntElt a, PrimElt a) => Mixed sh a -> Mixed sh a -> Mixed sh a Source #

matan2Array :: forall a (sh :: [Maybe Nat]). (FloatElt a, PrimElt a) => Mixed sh a -> Mixed sh a -> Mixed sh a Source #

Array elements

class Elt a Source #

Allowable element types in a mixed array, and by extension in a Ranked or Shaped array. Note the polymorphic instance for Elt of Primitive a; see the documentation for Primitive for more details.

Instances

Instances details
Elt CInt Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type ShapeTree CInt 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

mshape :: forall (sh :: [Maybe Nat]). Mixed sh CInt -> IShX sh Source #

mindex :: forall (sh :: [Maybe Nat]). Mixed sh CInt -> IIxX sh -> CInt Source #

mindexPartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]). Mixed (sh ++ sh') CInt -> IIxX sh -> Mixed sh' CInt Source #

mscalar :: CInt -> Mixed ('[] :: [Maybe Nat]) CInt Source #

mfromListOuter :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed sh CInt) -> Mixed (('Nothing :: Maybe Nat) ': sh) CInt Source #

mtoListOuter :: forall (n :: Maybe Nat) (sh :: [Maybe Nat]). Mixed (n ': sh) CInt -> [Mixed sh CInt] Source #

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b) -> Mixed sh1 CInt -> Mixed sh2 CInt Source #

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). StaticShX sh3 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b -> XArray (sh3 ++ sh') b) -> Mixed sh1 CInt -> Mixed sh2 CInt -> Mixed sh3 CInt Source #

mliftL :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> NonEmpty (XArray (sh1 ++ sh') b) -> NonEmpty (XArray (sh2 ++ sh') b)) -> NonEmpty (Mixed sh1 CInt) -> NonEmpty (Mixed sh2 CInt) Source #

mcastPartial :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh' :: [Maybe Nat]). Rank sh1 ~ Rank sh2 => StaticShX sh1 -> StaticShX sh2 -> Proxy sh' -> Mixed (sh1 ++ sh') CInt -> Mixed (sh2 ++ sh') CInt Source #

mtranspose :: forall (is :: [Natural]) (sh :: [Maybe Nat]). (IsPermutation is, Rank is <= Rank sh) => Perm is -> Mixed sh CInt -> Mixed (PermutePrefix is sh) CInt Source #

mconcat :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh) CInt) -> Mixed (('Nothing :: Maybe Nat) ': sh) CInt Source #

mrnf :: forall (sh :: [Maybe Nat]). Mixed sh CInt -> () Source #

mshapeTree :: CInt -> ShapeTree CInt Source #

mshapeTreeEq :: Proxy CInt -> ShapeTree CInt -> ShapeTree CInt -> Bool Source #

mshapeTreeEmpty :: Proxy CInt -> ShapeTree CInt -> Bool Source #

mshowShapeTree :: Proxy CInt -> ShapeTree CInt -> String Source #

marrayStrides :: forall (sh :: [Maybe Nat]). Mixed sh CInt -> Bag [Int] Source #

mvecsWrite :: forall (sh :: [Maybe Nat]) s. IShX sh -> IIxX sh -> CInt -> MixedVecs s sh CInt -> ST s () Source #

mvecsWritePartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) s. IShX (sh ++ sh') -> IIxX sh -> Mixed sh' CInt -> MixedVecs s (sh ++ sh') CInt -> ST s () Source #

mvecsFreeze :: forall (sh :: [Maybe Nat]) s. IShX sh -> MixedVecs s sh CInt -> ST s (Mixed sh CInt) Source #

Elt Int32 Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type ShapeTree Int32 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

mshape :: forall (sh :: [Maybe Nat]). Mixed sh Int32 -> IShX sh Source #

mindex :: forall (sh :: [Maybe Nat]). Mixed sh Int32 -> IIxX sh -> Int32 Source #

mindexPartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]). Mixed (sh ++ sh') Int32 -> IIxX sh -> Mixed sh' Int32 Source #

mscalar :: Int32 -> Mixed ('[] :: [Maybe Nat]) Int32 Source #

mfromListOuter :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed sh Int32) -> Mixed (('Nothing :: Maybe Nat) ': sh) Int32 Source #

mtoListOuter :: forall (n :: Maybe Nat) (sh :: [Maybe Nat]). Mixed (n ': sh) Int32 -> [Mixed sh Int32] Source #

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b) -> Mixed sh1 Int32 -> Mixed sh2 Int32 Source #

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). StaticShX sh3 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b -> XArray (sh3 ++ sh') b) -> Mixed sh1 Int32 -> Mixed sh2 Int32 -> Mixed sh3 Int32 Source #

mliftL :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> NonEmpty (XArray (sh1 ++ sh') b) -> NonEmpty (XArray (sh2 ++ sh') b)) -> NonEmpty (Mixed sh1 Int32) -> NonEmpty (Mixed sh2 Int32) Source #

mcastPartial :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh' :: [Maybe Nat]). Rank sh1 ~ Rank sh2 => StaticShX sh1 -> StaticShX sh2 -> Proxy sh' -> Mixed (sh1 ++ sh') Int32 -> Mixed (sh2 ++ sh') Int32 Source #

mtranspose :: forall (is :: [Natural]) (sh :: [Maybe Nat]). (IsPermutation is, Rank is <= Rank sh) => Perm is -> Mixed sh Int32 -> Mixed (PermutePrefix is sh) Int32 Source #

mconcat :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh) Int32) -> Mixed (('Nothing :: Maybe Nat) ': sh) Int32 Source #

mrnf :: forall (sh :: [Maybe Nat]). Mixed sh Int32 -> () Source #

mshapeTree :: Int32 -> ShapeTree Int32 Source #

mshapeTreeEq :: Proxy Int32 -> ShapeTree Int32 -> ShapeTree Int32 -> Bool Source #

mshapeTreeEmpty :: Proxy Int32 -> ShapeTree Int32 -> Bool Source #

mshowShapeTree :: Proxy Int32 -> ShapeTree Int32 -> String Source #

marrayStrides :: forall (sh :: [Maybe Nat]). Mixed sh Int32 -> Bag [Int] Source #

mvecsWrite :: forall (sh :: [Maybe Nat]) s. IShX sh -> IIxX sh -> Int32 -> MixedVecs s sh Int32 -> ST s () Source #

mvecsWritePartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) s. IShX (sh ++ sh') -> IIxX sh -> Mixed sh' Int32 -> MixedVecs s (sh ++ sh') Int32 -> ST s () Source #

mvecsFreeze :: forall (sh :: [Maybe Nat]) s. IShX sh -> MixedVecs s sh Int32 -> ST s (Mixed sh Int32) Source #

Elt Int64 Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type ShapeTree Int64 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

mshape :: forall (sh :: [Maybe Nat]). Mixed sh Int64 -> IShX sh Source #

mindex :: forall (sh :: [Maybe Nat]). Mixed sh Int64 -> IIxX sh -> Int64 Source #

mindexPartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]). Mixed (sh ++ sh') Int64 -> IIxX sh -> Mixed sh' Int64 Source #

mscalar :: Int64 -> Mixed ('[] :: [Maybe Nat]) Int64 Source #

mfromListOuter :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed sh Int64) -> Mixed (('Nothing :: Maybe Nat) ': sh) Int64 Source #

mtoListOuter :: forall (n :: Maybe Nat) (sh :: [Maybe Nat]). Mixed (n ': sh) Int64 -> [Mixed sh Int64] Source #

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b) -> Mixed sh1 Int64 -> Mixed sh2 Int64 Source #

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). StaticShX sh3 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b -> XArray (sh3 ++ sh') b) -> Mixed sh1 Int64 -> Mixed sh2 Int64 -> Mixed sh3 Int64 Source #

mliftL :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> NonEmpty (XArray (sh1 ++ sh') b) -> NonEmpty (XArray (sh2 ++ sh') b)) -> NonEmpty (Mixed sh1 Int64) -> NonEmpty (Mixed sh2 Int64) Source #

mcastPartial :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh' :: [Maybe Nat]). Rank sh1 ~ Rank sh2 => StaticShX sh1 -> StaticShX sh2 -> Proxy sh' -> Mixed (sh1 ++ sh') Int64 -> Mixed (sh2 ++ sh') Int64 Source #

mtranspose :: forall (is :: [Natural]) (sh :: [Maybe Nat]). (IsPermutation is, Rank is <= Rank sh) => Perm is -> Mixed sh Int64 -> Mixed (PermutePrefix is sh) Int64 Source #

mconcat :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh) Int64) -> Mixed (('Nothing :: Maybe Nat) ': sh) Int64 Source #

mrnf :: forall (sh :: [Maybe Nat]). Mixed sh Int64 -> () Source #

mshapeTree :: Int64 -> ShapeTree Int64 Source #

mshapeTreeEq :: Proxy Int64 -> ShapeTree Int64 -> ShapeTree Int64 -> Bool Source #

mshapeTreeEmpty :: Proxy Int64 -> ShapeTree Int64 -> Bool Source #

mshowShapeTree :: Proxy Int64 -> ShapeTree Int64 -> String Source #

marrayStrides :: forall (sh :: [Maybe Nat]). Mixed sh Int64 -> Bag [Int] Source #

mvecsWrite :: forall (sh :: [Maybe Nat]) s. IShX sh -> IIxX sh -> Int64 -> MixedVecs s sh Int64 -> ST s () Source #

mvecsWritePartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) s. IShX (sh ++ sh') -> IIxX sh -> Mixed sh' Int64 -> MixedVecs s (sh ++ sh') Int64 -> ST s () Source #

mvecsFreeze :: forall (sh :: [Maybe Nat]) s. IShX sh -> MixedVecs s sh Int64 -> ST s (Mixed sh Int64) Source #

Elt () Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type ShapeTree () 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

mshape :: forall (sh :: [Maybe Nat]). Mixed sh () -> IShX sh Source #

mindex :: forall (sh :: [Maybe Nat]). Mixed sh () -> IIxX sh -> () Source #

mindexPartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]). Mixed (sh ++ sh') () -> IIxX sh -> Mixed sh' () Source #

mscalar :: () -> Mixed ('[] :: [Maybe Nat]) () Source #

mfromListOuter :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed sh ()) -> Mixed (('Nothing :: Maybe Nat) ': sh) () Source #

mtoListOuter :: forall (n :: Maybe Nat) (sh :: [Maybe Nat]). Mixed (n ': sh) () -> [Mixed sh ()] Source #

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b) -> Mixed sh1 () -> Mixed sh2 () Source #

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). StaticShX sh3 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b -> XArray (sh3 ++ sh') b) -> Mixed sh1 () -> Mixed sh2 () -> Mixed sh3 () Source #

mliftL :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> NonEmpty (XArray (sh1 ++ sh') b) -> NonEmpty (XArray (sh2 ++ sh') b)) -> NonEmpty (Mixed sh1 ()) -> NonEmpty (Mixed sh2 ()) Source #

mcastPartial :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh' :: [Maybe Nat]). Rank sh1 ~ Rank sh2 => StaticShX sh1 -> StaticShX sh2 -> Proxy sh' -> Mixed (sh1 ++ sh') () -> Mixed (sh2 ++ sh') () Source #

mtranspose :: forall (is :: [Natural]) (sh :: [Maybe Nat]). (IsPermutation is, Rank is <= Rank sh) => Perm is -> Mixed sh () -> Mixed (PermutePrefix is sh) () Source #

mconcat :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh) ()) -> Mixed (('Nothing :: Maybe Nat) ': sh) () Source #

mrnf :: forall (sh :: [Maybe Nat]). Mixed sh () -> () Source #

mshapeTree :: () -> ShapeTree () Source #

mshapeTreeEq :: Proxy () -> ShapeTree () -> ShapeTree () -> Bool Source #

mshapeTreeEmpty :: Proxy () -> ShapeTree () -> Bool Source #

mshowShapeTree :: Proxy () -> ShapeTree () -> String Source #

marrayStrides :: forall (sh :: [Maybe Nat]). Mixed sh () -> Bag [Int] Source #

mvecsWrite :: forall (sh :: [Maybe Nat]) s. IShX sh -> IIxX sh -> () -> MixedVecs s sh () -> ST s () Source #

mvecsWritePartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) s. IShX (sh ++ sh') -> IIxX sh -> Mixed sh' () -> MixedVecs s (sh ++ sh') () -> ST s () Source #

mvecsFreeze :: forall (sh :: [Maybe Nat]) s. IShX sh -> MixedVecs s sh () -> ST s (Mixed sh ()) Source #

Elt Bool Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type ShapeTree Bool 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

mshape :: forall (sh :: [Maybe Nat]). Mixed sh Bool -> IShX sh Source #

mindex :: forall (sh :: [Maybe Nat]). Mixed sh Bool -> IIxX sh -> Bool Source #

mindexPartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]). Mixed (sh ++ sh') Bool -> IIxX sh -> Mixed sh' Bool Source #

mscalar :: Bool -> Mixed ('[] :: [Maybe Nat]) Bool Source #

mfromListOuter :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed sh Bool) -> Mixed (('Nothing :: Maybe Nat) ': sh) Bool Source #

mtoListOuter :: forall (n :: Maybe Nat) (sh :: [Maybe Nat]). Mixed (n ': sh) Bool -> [Mixed sh Bool] Source #

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b) -> Mixed sh1 Bool -> Mixed sh2 Bool Source #

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). StaticShX sh3 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b -> XArray (sh3 ++ sh') b) -> Mixed sh1 Bool -> Mixed sh2 Bool -> Mixed sh3 Bool Source #

mliftL :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> NonEmpty (XArray (sh1 ++ sh') b) -> NonEmpty (XArray (sh2 ++ sh') b)) -> NonEmpty (Mixed sh1 Bool) -> NonEmpty (Mixed sh2 Bool) Source #

mcastPartial :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh' :: [Maybe Nat]). Rank sh1 ~ Rank sh2 => StaticShX sh1 -> StaticShX sh2 -> Proxy sh' -> Mixed (sh1 ++ sh') Bool -> Mixed (sh2 ++ sh') Bool Source #

mtranspose :: forall (is :: [Natural]) (sh :: [Maybe Nat]). (IsPermutation is, Rank is <= Rank sh) => Perm is -> Mixed sh Bool -> Mixed (PermutePrefix is sh) Bool Source #

mconcat :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh) Bool) -> Mixed (('Nothing :: Maybe Nat) ': sh) Bool Source #

mrnf :: forall (sh :: [Maybe Nat]). Mixed sh Bool -> () Source #

mshapeTree :: Bool -> ShapeTree Bool Source #

mshapeTreeEq :: Proxy Bool -> ShapeTree Bool -> ShapeTree Bool -> Bool Source #

mshapeTreeEmpty :: Proxy Bool -> ShapeTree Bool -> Bool Source #

mshowShapeTree :: Proxy Bool -> ShapeTree Bool -> String Source #

marrayStrides :: forall (sh :: [Maybe Nat]). Mixed sh Bool -> Bag [Int] Source #

mvecsWrite :: forall (sh :: [Maybe Nat]) s. IShX sh -> IIxX sh -> Bool -> MixedVecs s sh Bool -> ST s () Source #

mvecsWritePartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) s. IShX (sh ++ sh') -> IIxX sh -> Mixed sh' Bool -> MixedVecs s (sh ++ sh') Bool -> ST s () Source #

mvecsFreeze :: forall (sh :: [Maybe Nat]) s. IShX sh -> MixedVecs s sh Bool -> ST s (Mixed sh Bool) Source #

Elt Double Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type ShapeTree Double 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

mshape :: forall (sh :: [Maybe Nat]). Mixed sh Double -> IShX sh Source #

mindex :: forall (sh :: [Maybe Nat]). Mixed sh Double -> IIxX sh -> Double Source #

mindexPartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]). Mixed (sh ++ sh') Double -> IIxX sh -> Mixed sh' Double Source #

mscalar :: Double -> Mixed ('[] :: [Maybe Nat]) Double Source #

mfromListOuter :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed sh Double) -> Mixed (('Nothing :: Maybe Nat) ': sh) Double Source #

mtoListOuter :: forall (n :: Maybe Nat) (sh :: [Maybe Nat]). Mixed (n ': sh) Double -> [Mixed sh Double] Source #

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b) -> Mixed sh1 Double -> Mixed sh2 Double Source #

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). StaticShX sh3 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b -> XArray (sh3 ++ sh') b) -> Mixed sh1 Double -> Mixed sh2 Double -> Mixed sh3 Double Source #

mliftL :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> NonEmpty (XArray (sh1 ++ sh') b) -> NonEmpty (XArray (sh2 ++ sh') b)) -> NonEmpty (Mixed sh1 Double) -> NonEmpty (Mixed sh2 Double) Source #

mcastPartial :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh' :: [Maybe Nat]). Rank sh1 ~ Rank sh2 => StaticShX sh1 -> StaticShX sh2 -> Proxy sh' -> Mixed (sh1 ++ sh') Double -> Mixed (sh2 ++ sh') Double Source #

mtranspose :: forall (is :: [Natural]) (sh :: [Maybe Nat]). (IsPermutation is, Rank is <= Rank sh) => Perm is -> Mixed sh Double -> Mixed (PermutePrefix is sh) Double Source #

mconcat :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh) Double) -> Mixed (('Nothing :: Maybe Nat) ': sh) Double Source #

mrnf :: forall (sh :: [Maybe Nat]). Mixed sh Double -> () Source #

mshapeTree :: Double -> ShapeTree Double Source #

mshapeTreeEq :: Proxy Double -> ShapeTree Double -> ShapeTree Double -> Bool Source #

mshapeTreeEmpty :: Proxy Double -> ShapeTree Double -> Bool Source #

mshowShapeTree :: Proxy Double -> ShapeTree Double -> String Source #

marrayStrides :: forall (sh :: [Maybe Nat]). Mixed sh Double -> Bag [Int] Source #

mvecsWrite :: forall (sh :: [Maybe Nat]) s. IShX sh -> IIxX sh -> Double -> MixedVecs s sh Double -> ST s () Source #

mvecsWritePartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) s. IShX (sh ++ sh') -> IIxX sh -> Mixed sh' Double -> MixedVecs s (sh ++ sh') Double -> ST s () Source #

mvecsFreeze :: forall (sh :: [Maybe Nat]) s. IShX sh -> MixedVecs s sh Double -> ST s (Mixed sh Double) Source #

Elt Float Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type ShapeTree Float 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

mshape :: forall (sh :: [Maybe Nat]). Mixed sh Float -> IShX sh Source #

mindex :: forall (sh :: [Maybe Nat]). Mixed sh Float -> IIxX sh -> Float Source #

mindexPartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]). Mixed (sh ++ sh') Float -> IIxX sh -> Mixed sh' Float Source #

mscalar :: Float -> Mixed ('[] :: [Maybe Nat]) Float Source #

mfromListOuter :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed sh Float) -> Mixed (('Nothing :: Maybe Nat) ': sh) Float Source #

mtoListOuter :: forall (n :: Maybe Nat) (sh :: [Maybe Nat]). Mixed (n ': sh) Float -> [Mixed sh Float] Source #

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b) -> Mixed sh1 Float -> Mixed sh2 Float Source #

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). StaticShX sh3 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b -> XArray (sh3 ++ sh') b) -> Mixed sh1 Float -> Mixed sh2 Float -> Mixed sh3 Float Source #

mliftL :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> NonEmpty (XArray (sh1 ++ sh') b) -> NonEmpty (XArray (sh2 ++ sh') b)) -> NonEmpty (Mixed sh1 Float) -> NonEmpty (Mixed sh2 Float) Source #

mcastPartial :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh' :: [Maybe Nat]). Rank sh1 ~ Rank sh2 => StaticShX sh1 -> StaticShX sh2 -> Proxy sh' -> Mixed (sh1 ++ sh') Float -> Mixed (sh2 ++ sh') Float Source #

mtranspose :: forall (is :: [Natural]) (sh :: [Maybe Nat]). (IsPermutation is, Rank is <= Rank sh) => Perm is -> Mixed sh Float -> Mixed (PermutePrefix is sh) Float Source #

mconcat :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh) Float) -> Mixed (('Nothing :: Maybe Nat) ': sh) Float Source #

mrnf :: forall (sh :: [Maybe Nat]). Mixed sh Float -> () Source #

mshapeTree :: Float -> ShapeTree Float Source #

mshapeTreeEq :: Proxy Float -> ShapeTree Float -> ShapeTree Float -> Bool Source #

mshapeTreeEmpty :: Proxy Float -> ShapeTree Float -> Bool Source #

mshowShapeTree :: Proxy Float -> ShapeTree Float -> String Source #

marrayStrides :: forall (sh :: [Maybe Nat]). Mixed sh Float -> Bag [Int] Source #

mvecsWrite :: forall (sh :: [Maybe Nat]) s. IShX sh -> IIxX sh -> Float -> MixedVecs s sh Float -> ST s () Source #

mvecsWritePartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) s. IShX (sh ++ sh') -> IIxX sh -> Mixed sh' Float -> MixedVecs s (sh ++ sh') Float -> ST s () Source #

mvecsFreeze :: forall (sh :: [Maybe Nat]) s. IShX sh -> MixedVecs s sh Float -> ST s (Mixed sh Float) Source #

Elt Int Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type ShapeTree Int 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

mshape :: forall (sh :: [Maybe Nat]). Mixed sh Int -> IShX sh Source #

mindex :: forall (sh :: [Maybe Nat]). Mixed sh Int -> IIxX sh -> Int Source #

mindexPartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]). Mixed (sh ++ sh') Int -> IIxX sh -> Mixed sh' Int Source #

mscalar :: Int -> Mixed ('[] :: [Maybe Nat]) Int Source #

mfromListOuter :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed sh Int) -> Mixed (('Nothing :: Maybe Nat) ': sh) Int Source #

mtoListOuter :: forall (n :: Maybe Nat) (sh :: [Maybe Nat]). Mixed (n ': sh) Int -> [Mixed sh Int] Source #

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b) -> Mixed sh1 Int -> Mixed sh2 Int Source #

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). StaticShX sh3 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b -> XArray (sh3 ++ sh') b) -> Mixed sh1 Int -> Mixed sh2 Int -> Mixed sh3 Int Source #

mliftL :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> NonEmpty (XArray (sh1 ++ sh') b) -> NonEmpty (XArray (sh2 ++ sh') b)) -> NonEmpty (Mixed sh1 Int) -> NonEmpty (Mixed sh2 Int) Source #

mcastPartial :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh' :: [Maybe Nat]). Rank sh1 ~ Rank sh2 => StaticShX sh1 -> StaticShX sh2 -> Proxy sh' -> Mixed (sh1 ++ sh') Int -> Mixed (sh2 ++ sh') Int Source #

mtranspose :: forall (is :: [Natural]) (sh :: [Maybe Nat]). (IsPermutation is, Rank is <= Rank sh) => Perm is -> Mixed sh Int -> Mixed (PermutePrefix is sh) Int Source #

mconcat :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh) Int) -> Mixed (('Nothing :: Maybe Nat) ': sh) Int Source #

mrnf :: forall (sh :: [Maybe Nat]). Mixed sh Int -> () Source #

mshapeTree :: Int -> ShapeTree Int Source #

mshapeTreeEq :: Proxy Int -> ShapeTree Int -> ShapeTree Int -> Bool Source #

mshapeTreeEmpty :: Proxy Int -> ShapeTree Int -> Bool Source #

mshowShapeTree :: Proxy Int -> ShapeTree Int -> String Source #

marrayStrides :: forall (sh :: [Maybe Nat]). Mixed sh Int -> Bag [Int] Source #

mvecsWrite :: forall (sh :: [Maybe Nat]) s. IShX sh -> IIxX sh -> Int -> MixedVecs s sh Int -> ST s () Source #

mvecsWritePartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) s. IShX (sh ++ sh') -> IIxX sh -> Mixed sh' Int -> MixedVecs s (sh ++ sh') Int -> ST s () Source #

mvecsFreeze :: forall (sh :: [Maybe Nat]) s. IShX sh -> MixedVecs s sh Int -> ST s (Mixed sh Int) Source #

Storable a => Elt (Primitive a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type ShapeTree (Primitive a) 
Instance details

Defined in Data.Array.Nested.Mixed

type ShapeTree (Primitive a) = ()

Methods

mshape :: forall (sh :: [Maybe Nat]). Mixed sh (Primitive a) -> IShX sh Source #

mindex :: forall (sh :: [Maybe Nat]). Mixed sh (Primitive a) -> IIxX sh -> Primitive a Source #

mindexPartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]). Mixed (sh ++ sh') (Primitive a) -> IIxX sh -> Mixed sh' (Primitive a) Source #

mscalar :: Primitive a -> Mixed ('[] :: [Maybe Nat]) (Primitive a) Source #

mfromListOuter :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed sh (Primitive a)) -> Mixed (('Nothing :: Maybe Nat) ': sh) (Primitive a) Source #

mtoListOuter :: forall (n :: Maybe Nat) (sh :: [Maybe Nat]). Mixed (n ': sh) (Primitive a) -> [Mixed sh (Primitive a)] Source #

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b) -> Mixed sh1 (Primitive a) -> Mixed sh2 (Primitive a) Source #

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). StaticShX sh3 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b -> XArray (sh3 ++ sh') b) -> Mixed sh1 (Primitive a) -> Mixed sh2 (Primitive a) -> Mixed sh3 (Primitive a) Source #

mliftL :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> NonEmpty (XArray (sh1 ++ sh') b) -> NonEmpty (XArray (sh2 ++ sh') b)) -> NonEmpty (Mixed sh1 (Primitive a)) -> NonEmpty (Mixed sh2 (Primitive a)) Source #

mcastPartial :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh' :: [Maybe Nat]). Rank sh1 ~ Rank sh2 => StaticShX sh1 -> StaticShX sh2 -> Proxy sh' -> Mixed (sh1 ++ sh') (Primitive a) -> Mixed (sh2 ++ sh') (Primitive a) Source #

mtranspose :: forall (is :: [Natural]) (sh :: [Maybe Nat]). (IsPermutation is, Rank is <= Rank sh) => Perm is -> Mixed sh (Primitive a) -> Mixed (PermutePrefix is sh) (Primitive a) Source #

mconcat :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh) (Primitive a)) -> Mixed (('Nothing :: Maybe Nat) ': sh) (Primitive a) Source #

mrnf :: forall (sh :: [Maybe Nat]). Mixed sh (Primitive a) -> () Source #

mshapeTree :: Primitive a -> ShapeTree (Primitive a) Source #

mshapeTreeEq :: Proxy (Primitive a) -> ShapeTree (Primitive a) -> ShapeTree (Primitive a) -> Bool Source #

mshapeTreeEmpty :: Proxy (Primitive a) -> ShapeTree (Primitive a) -> Bool Source #

mshowShapeTree :: Proxy (Primitive a) -> ShapeTree (Primitive a) -> String Source #

marrayStrides :: forall (sh :: [Maybe Nat]). Mixed sh (Primitive a) -> Bag [Int] Source #

mvecsWrite :: forall (sh :: [Maybe Nat]) s. IShX sh -> IIxX sh -> Primitive a -> MixedVecs s sh (Primitive a) -> ST s () Source #

mvecsWritePartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) s. IShX (sh ++ sh') -> IIxX sh -> Mixed sh' (Primitive a) -> MixedVecs s (sh ++ sh') (Primitive a) -> ST s () Source #

mvecsFreeze :: forall (sh :: [Maybe Nat]) s. IShX sh -> MixedVecs s sh (Primitive a) -> ST s (Mixed sh (Primitive a)) Source #

Elt a => Elt (Mixed sh' a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type ShapeTree (Mixed sh' a) 
Instance details

Defined in Data.Array.Nested.Mixed

type ShapeTree (Mixed sh' a) = (IShX sh', ShapeTree a)

Methods

mshape :: forall (sh :: [Maybe Nat]). Mixed sh (Mixed sh' a) -> IShX sh Source #

mindex :: forall (sh :: [Maybe Nat]). Mixed sh (Mixed sh' a) -> IIxX sh -> Mixed sh' a Source #

mindexPartial :: forall (sh :: [Maybe Nat]) (sh'0 :: [Maybe Nat]). Mixed (sh ++ sh'0) (Mixed sh' a) -> IIxX sh -> Mixed sh'0 (Mixed sh' a) Source #

mscalar :: Mixed sh' a -> Mixed ('[] :: [Maybe Nat]) (Mixed sh' a) Source #

mfromListOuter :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed sh (Mixed sh' a)) -> Mixed (('Nothing :: Maybe Nat) ': sh) (Mixed sh' a) Source #

mtoListOuter :: forall (n :: Maybe Nat) (sh :: [Maybe Nat]). Mixed (n ': sh) (Mixed sh' a) -> [Mixed sh (Mixed sh' a)] Source #

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh'0 :: [Maybe Nat]) b. Storable b => StaticShX sh'0 -> XArray (sh1 ++ sh'0) b -> XArray (sh2 ++ sh'0) b) -> Mixed sh1 (Mixed sh' a) -> Mixed sh2 (Mixed sh' a) Source #

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). StaticShX sh3 -> (forall (sh'0 :: [Maybe Nat]) b. Storable b => StaticShX sh'0 -> XArray (sh1 ++ sh'0) b -> XArray (sh2 ++ sh'0) b -> XArray (sh3 ++ sh'0) b) -> Mixed sh1 (Mixed sh' a) -> Mixed sh2 (Mixed sh' a) -> Mixed sh3 (Mixed sh' a) Source #

mliftL :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh'0 :: [Maybe Nat]) b. Storable b => StaticShX sh'0 -> NonEmpty (XArray (sh1 ++ sh'0) b) -> NonEmpty (XArray (sh2 ++ sh'0) b)) -> NonEmpty (Mixed sh1 (Mixed sh' a)) -> NonEmpty (Mixed sh2 (Mixed sh' a)) Source #

mcastPartial :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh'0 :: [Maybe Nat]). Rank sh1 ~ Rank sh2 => StaticShX sh1 -> StaticShX sh2 -> Proxy sh'0 -> Mixed (sh1 ++ sh'0) (Mixed sh' a) -> Mixed (sh2 ++ sh'0) (Mixed sh' a) Source #

mtranspose :: forall (is :: [Natural]) (sh :: [Maybe Nat]). (IsPermutation is, Rank is <= Rank sh) => Perm is -> Mixed sh (Mixed sh' a) -> Mixed (PermutePrefix is sh) (Mixed sh' a) Source #

mconcat :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh) (Mixed sh' a)) -> Mixed (('Nothing :: Maybe Nat) ': sh) (Mixed sh' a) Source #

mrnf :: forall (sh :: [Maybe Nat]). Mixed sh (Mixed sh' a) -> () Source #

mshapeTree :: Mixed sh' a -> ShapeTree (Mixed sh' a) Source #

mshapeTreeEq :: Proxy (Mixed sh' a) -> ShapeTree (Mixed sh' a) -> ShapeTree (Mixed sh' a) -> Bool Source #

mshapeTreeEmpty :: Proxy (Mixed sh' a) -> ShapeTree (Mixed sh' a) -> Bool Source #

mshowShapeTree :: Proxy (Mixed sh' a) -> ShapeTree (Mixed sh' a) -> String Source #

marrayStrides :: forall (sh :: [Maybe Nat]). Mixed sh (Mixed sh' a) -> Bag [Int] Source #

mvecsWrite :: forall (sh :: [Maybe Nat]) s. IShX sh -> IIxX sh -> Mixed sh' a -> MixedVecs s sh (Mixed sh' a) -> ST s () Source #

mvecsWritePartial :: forall (sh :: [Maybe Nat]) (sh'0 :: [Maybe Nat]) s. IShX (sh ++ sh'0) -> IIxX sh -> Mixed sh'0 (Mixed sh' a) -> MixedVecs s (sh ++ sh'0) (Mixed sh' a) -> ST s () Source #

mvecsFreeze :: forall (sh :: [Maybe Nat]) s. IShX sh -> MixedVecs s sh (Mixed sh' a) -> ST s (Mixed sh (Mixed sh' a)) Source #

Elt a => Elt (Ranked n a) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

Associated Types

type ShapeTree (Ranked n a) 
Instance details

Defined in Data.Array.Nested.Ranked.Base

type ShapeTree (Ranked n a) = (IShR n, ShapeTree a)

Methods

mshape :: forall (sh :: [Maybe Nat]). Mixed sh (Ranked n a) -> IShX sh Source #

mindex :: forall (sh :: [Maybe Nat]). Mixed sh (Ranked n a) -> IIxX sh -> Ranked n a Source #

mindexPartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]). Mixed (sh ++ sh') (Ranked n a) -> IIxX sh -> Mixed sh' (Ranked n a) Source #

mscalar :: Ranked n a -> Mixed ('[] :: [Maybe Nat]) (Ranked n a) Source #

mfromListOuter :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed sh (Ranked n a)) -> Mixed (('Nothing :: Maybe Nat) ': sh) (Ranked n a) Source #

mtoListOuter :: forall (n0 :: Maybe Nat) (sh :: [Maybe Nat]). Mixed (n0 ': sh) (Ranked n a) -> [Mixed sh (Ranked n a)] Source #

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b) -> Mixed sh1 (Ranked n a) -> Mixed sh2 (Ranked n a) Source #

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). StaticShX sh3 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b -> XArray (sh3 ++ sh') b) -> Mixed sh1 (Ranked n a) -> Mixed sh2 (Ranked n a) -> Mixed sh3 (Ranked n a) Source #

mliftL :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> NonEmpty (XArray (sh1 ++ sh') b) -> NonEmpty (XArray (sh2 ++ sh') b)) -> NonEmpty (Mixed sh1 (Ranked n a)) -> NonEmpty (Mixed sh2 (Ranked n a)) Source #

mcastPartial :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh' :: [Maybe Nat]). Rank sh1 ~ Rank sh2 => StaticShX sh1 -> StaticShX sh2 -> Proxy sh' -> Mixed (sh1 ++ sh') (Ranked n a) -> Mixed (sh2 ++ sh') (Ranked n a) Source #

mtranspose :: forall (is :: [Natural]) (sh :: [Maybe Nat]). (IsPermutation is, Rank is <= Rank sh) => Perm is -> Mixed sh (Ranked n a) -> Mixed (PermutePrefix is sh) (Ranked n a) Source #

mconcat :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh) (Ranked n a)) -> Mixed (('Nothing :: Maybe Nat) ': sh) (Ranked n a) Source #

mrnf :: forall (sh :: [Maybe Nat]). Mixed sh (Ranked n a) -> () Source #

mshapeTree :: Ranked n a -> ShapeTree (Ranked n a) Source #

mshapeTreeEq :: Proxy (Ranked n a) -> ShapeTree (Ranked n a) -> ShapeTree (Ranked n a) -> Bool Source #

mshapeTreeEmpty :: Proxy (Ranked n a) -> ShapeTree (Ranked n a) -> Bool Source #

mshowShapeTree :: Proxy (Ranked n a) -> ShapeTree (Ranked n a) -> String Source #

marrayStrides :: forall (sh :: [Maybe Nat]). Mixed sh (Ranked n a) -> Bag [Int] Source #

mvecsWrite :: forall (sh :: [Maybe Nat]) s. IShX sh -> IIxX sh -> Ranked n a -> MixedVecs s sh (Ranked n a) -> ST s () Source #

mvecsWritePartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) s. IShX (sh ++ sh') -> IIxX sh -> Mixed sh' (Ranked n a) -> MixedVecs s (sh ++ sh') (Ranked n a) -> ST s () Source #

mvecsFreeze :: forall (sh :: [Maybe Nat]) s. IShX sh -> MixedVecs s sh (Ranked n a) -> ST s (Mixed sh (Ranked n a)) Source #

Elt a => Elt (Shaped sh a) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

Associated Types

type ShapeTree (Shaped sh a) 
Instance details

Defined in Data.Array.Nested.Shaped.Base

type ShapeTree (Shaped sh a) = (ShS sh, ShapeTree a)

Methods

mshape :: forall (sh0 :: [Maybe Nat]). Mixed sh0 (Shaped sh a) -> IShX sh0 Source #

mindex :: forall (sh0 :: [Maybe Nat]). Mixed sh0 (Shaped sh a) -> IIxX sh0 -> Shaped sh a Source #

mindexPartial :: forall (sh0 :: [Maybe Nat]) (sh' :: [Maybe Nat]). Mixed (sh0 ++ sh') (Shaped sh a) -> IIxX sh0 -> Mixed sh' (Shaped sh a) Source #

mscalar :: Shaped sh a -> Mixed ('[] :: [Maybe Nat]) (Shaped sh a) Source #

mfromListOuter :: forall (sh0 :: [Maybe Nat]). NonEmpty (Mixed sh0 (Shaped sh a)) -> Mixed (('Nothing :: Maybe Nat) ': sh0) (Shaped sh a) Source #

mtoListOuter :: forall (n :: Maybe Nat) (sh0 :: [Maybe Nat]). Mixed (n ': sh0) (Shaped sh a) -> [Mixed sh0 (Shaped sh a)] Source #

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b) -> Mixed sh1 (Shaped sh a) -> Mixed sh2 (Shaped sh a) Source #

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). StaticShX sh3 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b -> XArray (sh3 ++ sh') b) -> Mixed sh1 (Shaped sh a) -> Mixed sh2 (Shaped sh a) -> Mixed sh3 (Shaped sh a) Source #

mliftL :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> NonEmpty (XArray (sh1 ++ sh') b) -> NonEmpty (XArray (sh2 ++ sh') b)) -> NonEmpty (Mixed sh1 (Shaped sh a)) -> NonEmpty (Mixed sh2 (Shaped sh a)) Source #

mcastPartial :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh' :: [Maybe Nat]). Rank sh1 ~ Rank sh2 => StaticShX sh1 -> StaticShX sh2 -> Proxy sh' -> Mixed (sh1 ++ sh') (Shaped sh a) -> Mixed (sh2 ++ sh') (Shaped sh a) Source #

mtranspose :: forall (is :: [Natural]) (sh0 :: [Maybe Nat]). (IsPermutation is, Rank is <= Rank sh0) => Perm is -> Mixed sh0 (Shaped sh a) -> Mixed (PermutePrefix is sh0) (Shaped sh a) Source #

mconcat :: forall (sh0 :: [Maybe Nat]). NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh0) (Shaped sh a)) -> Mixed (('Nothing :: Maybe Nat) ': sh0) (Shaped sh a) Source #

mrnf :: forall (sh0 :: [Maybe Nat]). Mixed sh0 (Shaped sh a) -> () Source #

mshapeTree :: Shaped sh a -> ShapeTree (Shaped sh a) Source #

mshapeTreeEq :: Proxy (Shaped sh a) -> ShapeTree (Shaped sh a) -> ShapeTree (Shaped sh a) -> Bool Source #

mshapeTreeEmpty :: Proxy (Shaped sh a) -> ShapeTree (Shaped sh a) -> Bool Source #

mshowShapeTree :: Proxy (Shaped sh a) -> ShapeTree (Shaped sh a) -> String Source #

marrayStrides :: forall (sh0 :: [Maybe Nat]). Mixed sh0 (Shaped sh a) -> Bag [Int] Source #

mvecsWrite :: forall (sh0 :: [Maybe Nat]) s. IShX sh0 -> IIxX sh0 -> Shaped sh a -> MixedVecs s sh0 (Shaped sh a) -> ST s () Source #

mvecsWritePartial :: forall (sh0 :: [Maybe Nat]) (sh' :: [Maybe Nat]) s. IShX (sh0 ++ sh') -> IIxX sh0 -> Mixed sh' (Shaped sh a) -> MixedVecs s (sh0 ++ sh') (Shaped sh a) -> ST s () Source #

mvecsFreeze :: forall (sh0 :: [Maybe Nat]) s. IShX sh0 -> MixedVecs s sh0 (Shaped sh a) -> ST s (Mixed sh0 (Shaped sh a)) Source #

(Elt a, Elt b) => Elt (a, b) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type ShapeTree (a, b) 
Instance details

Defined in Data.Array.Nested.Mixed

type ShapeTree (a, b) = (ShapeTree a, ShapeTree b)

Methods

mshape :: forall (sh :: [Maybe Nat]). Mixed sh (a, b) -> IShX sh Source #

mindex :: forall (sh :: [Maybe Nat]). Mixed sh (a, b) -> IIxX sh -> (a, b) Source #

mindexPartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]). Mixed (sh ++ sh') (a, b) -> IIxX sh -> Mixed sh' (a, b) Source #

mscalar :: (a, b) -> Mixed ('[] :: [Maybe Nat]) (a, b) Source #

mfromListOuter :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed sh (a, b)) -> Mixed (('Nothing :: Maybe Nat) ': sh) (a, b) Source #

mtoListOuter :: forall (n :: Maybe Nat) (sh :: [Maybe Nat]). Mixed (n ': sh) (a, b) -> [Mixed sh (a, b)] Source #

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b0. Storable b0 => StaticShX sh' -> XArray (sh1 ++ sh') b0 -> XArray (sh2 ++ sh') b0) -> Mixed sh1 (a, b) -> Mixed sh2 (a, b) Source #

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). StaticShX sh3 -> (forall (sh' :: [Maybe Nat]) b0. Storable b0 => StaticShX sh' -> XArray (sh1 ++ sh') b0 -> XArray (sh2 ++ sh') b0 -> XArray (sh3 ++ sh') b0) -> Mixed sh1 (a, b) -> Mixed sh2 (a, b) -> Mixed sh3 (a, b) Source #

mliftL :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b0. Storable b0 => StaticShX sh' -> NonEmpty (XArray (sh1 ++ sh') b0) -> NonEmpty (XArray (sh2 ++ sh') b0)) -> NonEmpty (Mixed sh1 (a, b)) -> NonEmpty (Mixed sh2 (a, b)) Source #

mcastPartial :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh' :: [Maybe Nat]). Rank sh1 ~ Rank sh2 => StaticShX sh1 -> StaticShX sh2 -> Proxy sh' -> Mixed (sh1 ++ sh') (a, b) -> Mixed (sh2 ++ sh') (a, b) Source #

mtranspose :: forall (is :: [Natural]) (sh :: [Maybe Nat]). (IsPermutation is, Rank is <= Rank sh) => Perm is -> Mixed sh (a, b) -> Mixed (PermutePrefix is sh) (a, b) Source #

mconcat :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh) (a, b)) -> Mixed (('Nothing :: Maybe Nat) ': sh) (a, b) Source #

mrnf :: forall (sh :: [Maybe Nat]). Mixed sh (a, b) -> () Source #

mshapeTree :: (a, b) -> ShapeTree (a, b) Source #

mshapeTreeEq :: Proxy (a, b) -> ShapeTree (a, b) -> ShapeTree (a, b) -> Bool Source #

mshapeTreeEmpty :: Proxy (a, b) -> ShapeTree (a, b) -> Bool Source #

mshowShapeTree :: Proxy (a, b) -> ShapeTree (a, b) -> String Source #

marrayStrides :: forall (sh :: [Maybe Nat]). Mixed sh (a, b) -> Bag [Int] Source #

mvecsWrite :: forall (sh :: [Maybe Nat]) s. IShX sh -> IIxX sh -> (a, b) -> MixedVecs s sh (a, b) -> ST s () Source #

mvecsWritePartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) s. IShX (sh ++ sh') -> IIxX sh -> Mixed sh' (a, b) -> MixedVecs s (sh ++ sh') (a, b) -> ST s () Source #

mvecsFreeze :: forall (sh :: [Maybe Nat]) s. IShX sh -> MixedVecs s sh (a, b) -> ST s (Mixed sh (a, b)) Source #

class (Storable a, Elt a) => PrimElt a Source #

Element types that are primitive; arrays of these types are just a newtype wrapper over an array.

Instances

Instances details
PrimElt CInt Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

fromPrimitive :: forall (sh :: [Maybe Nat]). Mixed sh (Primitive CInt) -> Mixed sh CInt Source #

toPrimitive :: forall (sh :: [Maybe Nat]). Mixed sh CInt -> Mixed sh (Primitive CInt) Source #

PrimElt Int32 Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

fromPrimitive :: forall (sh :: [Maybe Nat]). Mixed sh (Primitive Int32) -> Mixed sh Int32 Source #

toPrimitive :: forall (sh :: [Maybe Nat]). Mixed sh Int32 -> Mixed sh (Primitive Int32) Source #

PrimElt Int64 Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

fromPrimitive :: forall (sh :: [Maybe Nat]). Mixed sh (Primitive Int64) -> Mixed sh Int64 Source #

toPrimitive :: forall (sh :: [Maybe Nat]). Mixed sh Int64 -> Mixed sh (Primitive Int64) Source #

PrimElt () Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

fromPrimitive :: forall (sh :: [Maybe Nat]). Mixed sh (Primitive ()) -> Mixed sh () Source #

toPrimitive :: forall (sh :: [Maybe Nat]). Mixed sh () -> Mixed sh (Primitive ()) Source #

PrimElt Bool Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

fromPrimitive :: forall (sh :: [Maybe Nat]). Mixed sh (Primitive Bool) -> Mixed sh Bool Source #

toPrimitive :: forall (sh :: [Maybe Nat]). Mixed sh Bool -> Mixed sh (Primitive Bool) Source #

PrimElt Double Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

fromPrimitive :: forall (sh :: [Maybe Nat]). Mixed sh (Primitive Double) -> Mixed sh Double Source #

toPrimitive :: forall (sh :: [Maybe Nat]). Mixed sh Double -> Mixed sh (Primitive Double) Source #

PrimElt Float Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

fromPrimitive :: forall (sh :: [Maybe Nat]). Mixed sh (Primitive Float) -> Mixed sh Float Source #

toPrimitive :: forall (sh :: [Maybe Nat]). Mixed sh Float -> Mixed sh (Primitive Float) Source #

PrimElt Int Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

fromPrimitive :: forall (sh :: [Maybe Nat]). Mixed sh (Primitive Int) -> Mixed sh Int Source #

toPrimitive :: forall (sh :: [Maybe Nat]). Mixed sh Int -> Mixed sh (Primitive Int) Source #

newtype Primitive a Source #

Wrapper type used as a tag to attach instances on. The instances on arrays of Primitive a are more polymorphic than the direct instances for arrays of scalars; this means that if orthotope supports an element type T that this library does not (directly), it may just work if you use an array of Primitive T instead.

Constructors

Primitive a 

Instances

Instances details
Show a => Show (Primitive a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Storable a => Elt (Primitive a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type ShapeTree (Primitive a) 
Instance details

Defined in Data.Array.Nested.Mixed

type ShapeTree (Primitive a) = ()

Methods

mshape :: forall (sh :: [Maybe Nat]). Mixed sh (Primitive a) -> IShX sh Source #

mindex :: forall (sh :: [Maybe Nat]). Mixed sh (Primitive a) -> IIxX sh -> Primitive a Source #

mindexPartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]). Mixed (sh ++ sh') (Primitive a) -> IIxX sh -> Mixed sh' (Primitive a) Source #

mscalar :: Primitive a -> Mixed ('[] :: [Maybe Nat]) (Primitive a) Source #

mfromListOuter :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed sh (Primitive a)) -> Mixed (('Nothing :: Maybe Nat) ': sh) (Primitive a) Source #

mtoListOuter :: forall (n :: Maybe Nat) (sh :: [Maybe Nat]). Mixed (n ': sh) (Primitive a) -> [Mixed sh (Primitive a)] Source #

mlift :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b) -> Mixed sh1 (Primitive a) -> Mixed sh2 (Primitive a) Source #

mlift2 :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh3 :: [Maybe Nat]). StaticShX sh3 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> XArray (sh1 ++ sh') b -> XArray (sh2 ++ sh') b -> XArray (sh3 ++ sh') b) -> Mixed sh1 (Primitive a) -> Mixed sh2 (Primitive a) -> Mixed sh3 (Primitive a) Source #

mliftL :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]). StaticShX sh2 -> (forall (sh' :: [Maybe Nat]) b. Storable b => StaticShX sh' -> NonEmpty (XArray (sh1 ++ sh') b) -> NonEmpty (XArray (sh2 ++ sh') b)) -> NonEmpty (Mixed sh1 (Primitive a)) -> NonEmpty (Mixed sh2 (Primitive a)) Source #

mcastPartial :: forall (sh1 :: [Maybe Nat]) (sh2 :: [Maybe Nat]) (sh' :: [Maybe Nat]). Rank sh1 ~ Rank sh2 => StaticShX sh1 -> StaticShX sh2 -> Proxy sh' -> Mixed (sh1 ++ sh') (Primitive a) -> Mixed (sh2 ++ sh') (Primitive a) Source #

mtranspose :: forall (is :: [Natural]) (sh :: [Maybe Nat]). (IsPermutation is, Rank is <= Rank sh) => Perm is -> Mixed sh (Primitive a) -> Mixed (PermutePrefix is sh) (Primitive a) Source #

mconcat :: forall (sh :: [Maybe Nat]). NonEmpty (Mixed (('Nothing :: Maybe Nat) ': sh) (Primitive a)) -> Mixed (('Nothing :: Maybe Nat) ': sh) (Primitive a) Source #

mrnf :: forall (sh :: [Maybe Nat]). Mixed sh (Primitive a) -> () Source #

mshapeTree :: Primitive a -> ShapeTree (Primitive a) Source #

mshapeTreeEq :: Proxy (Primitive a) -> ShapeTree (Primitive a) -> ShapeTree (Primitive a) -> Bool Source #

mshapeTreeEmpty :: Proxy (Primitive a) -> ShapeTree (Primitive a) -> Bool Source #

mshowShapeTree :: Proxy (Primitive a) -> ShapeTree (Primitive a) -> String Source #

marrayStrides :: forall (sh :: [Maybe Nat]). Mixed sh (Primitive a) -> Bag [Int] Source #

mvecsWrite :: forall (sh :: [Maybe Nat]) s. IShX sh -> IIxX sh -> Primitive a -> MixedVecs s sh (Primitive a) -> ST s () Source #

mvecsWritePartial :: forall (sh :: [Maybe Nat]) (sh' :: [Maybe Nat]) s. IShX (sh ++ sh') -> IIxX sh -> Mixed sh' (Primitive a) -> MixedVecs s (sh ++ sh') (Primitive a) -> ST s () Source #

mvecsFreeze :: forall (sh :: [Maybe Nat]) s. IShX sh -> MixedVecs s sh (Primitive a) -> ST s (Mixed sh (Primitive a)) Source #

Storable a => KnownElt (Primitive a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

memptyArrayUnsafe :: forall (sh :: [Maybe Nat]). IShX sh -> Mixed sh (Primitive a) Source #

mvecsUnsafeNew :: forall (sh :: [Maybe Nat]) s. IShX sh -> Primitive a -> ST s (MixedVecs s sh (Primitive a)) Source #

mvecsNewEmpty :: forall s (sh :: [Maybe Nat]). Proxy (Primitive a) -> ST s (MixedVecs s sh (Primitive a)) Source #

Generic (Mixed sh (Primitive a)) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Associated Types

type Rep (Mixed sh (Primitive a)) 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh (Primitive a)) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'False) (C1 ('MetaCons "M_Primitive" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (IShX sh)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (XArray sh a))))

Methods

from :: Mixed sh (Primitive a) -> Rep (Mixed sh (Primitive a)) x #

to :: Rep (Mixed sh (Primitive a)) x -> Mixed sh (Primitive a) #

(Eq a, Storable a) => Eq (Mixed sh (Primitive a)) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

(==) :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Bool #

(/=) :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Bool #

(Ord a, Storable a) => Ord (Mixed sh (Primitive a)) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

compare :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Ordering #

(<) :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Bool #

(<=) :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Bool #

(>) :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Bool #

(>=) :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Bool #

max :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Mixed sh (Primitive a) #

min :: Mixed sh (Primitive a) -> Mixed sh (Primitive a) -> Mixed sh (Primitive a) #

newtype MixedVecs s sh (Primitive a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

newtype MixedVecs s sh (Primitive a) = MV_Primitive (MVector s a)
data Mixed sh (Primitive a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

data Mixed sh (Primitive a) = M_Primitive !(IShX sh) !(XArray sh a)
type ShapeTree (Primitive a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

type ShapeTree (Primitive a) = ()
type Rep (Mixed sh (Primitive a)) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

type Rep (Mixed sh (Primitive a)) = D1 ('MetaData "Mixed" "Data.Array.Nested.Mixed" "ox-arrays-0.1.0.0-G9rS3ky7ORtC6G06Mvzq1I" 'False) (C1 ('MetaCons "M_Primitive" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (IShX sh)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (XArray sh a))))

class Elt a => KnownElt a Source #

Element types for which we have evidence of the (static part of the) shape in a type class constraint. Compare the instance contexts of the instances of this class with those of Elt: some instances have an additional "known-shape" constraint.

This class is (currently) only required for memptyArray and mgenerate.

Minimal complete definition

memptyArrayUnsafe, mvecsUnsafeNew, mvecsNewEmpty

Instances

Instances details
KnownElt CInt Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

memptyArrayUnsafe :: forall (sh :: [Maybe Nat]). IShX sh -> Mixed sh CInt Source #

mvecsUnsafeNew :: forall (sh :: [Maybe Nat]) s. IShX sh -> CInt -> ST s (MixedVecs s sh CInt) Source #

mvecsNewEmpty :: forall s (sh :: [Maybe Nat]). Proxy CInt -> ST s (MixedVecs s sh CInt) Source #

KnownElt Int32 Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

memptyArrayUnsafe :: forall (sh :: [Maybe Nat]). IShX sh -> Mixed sh Int32 Source #

mvecsUnsafeNew :: forall (sh :: [Maybe Nat]) s. IShX sh -> Int32 -> ST s (MixedVecs s sh Int32) Source #

mvecsNewEmpty :: forall s (sh :: [Maybe Nat]). Proxy Int32 -> ST s (MixedVecs s sh Int32) Source #

KnownElt Int64 Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

memptyArrayUnsafe :: forall (sh :: [Maybe Nat]). IShX sh -> Mixed sh Int64 Source #

mvecsUnsafeNew :: forall (sh :: [Maybe Nat]) s. IShX sh -> Int64 -> ST s (MixedVecs s sh Int64) Source #

mvecsNewEmpty :: forall s (sh :: [Maybe Nat]). Proxy Int64 -> ST s (MixedVecs s sh Int64) Source #

KnownElt () Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

memptyArrayUnsafe :: forall (sh :: [Maybe Nat]). IShX sh -> Mixed sh () Source #

mvecsUnsafeNew :: forall (sh :: [Maybe Nat]) s. IShX sh -> () -> ST s (MixedVecs s sh ()) Source #

mvecsNewEmpty :: forall s (sh :: [Maybe Nat]). Proxy () -> ST s (MixedVecs s sh ()) Source #

KnownElt Bool Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

memptyArrayUnsafe :: forall (sh :: [Maybe Nat]). IShX sh -> Mixed sh Bool Source #

mvecsUnsafeNew :: forall (sh :: [Maybe Nat]) s. IShX sh -> Bool -> ST s (MixedVecs s sh Bool) Source #

mvecsNewEmpty :: forall s (sh :: [Maybe Nat]). Proxy Bool -> ST s (MixedVecs s sh Bool) Source #

KnownElt Double Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

memptyArrayUnsafe :: forall (sh :: [Maybe Nat]). IShX sh -> Mixed sh Double Source #

mvecsUnsafeNew :: forall (sh :: [Maybe Nat]) s. IShX sh -> Double -> ST s (MixedVecs s sh Double) Source #

mvecsNewEmpty :: forall s (sh :: [Maybe Nat]). Proxy Double -> ST s (MixedVecs s sh Double) Source #

KnownElt Float Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

memptyArrayUnsafe :: forall (sh :: [Maybe Nat]). IShX sh -> Mixed sh Float Source #

mvecsUnsafeNew :: forall (sh :: [Maybe Nat]) s. IShX sh -> Float -> ST s (MixedVecs s sh Float) Source #

mvecsNewEmpty :: forall s (sh :: [Maybe Nat]). Proxy Float -> ST s (MixedVecs s sh Float) Source #

KnownElt Int Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

memptyArrayUnsafe :: forall (sh :: [Maybe Nat]). IShX sh -> Mixed sh Int Source #

mvecsUnsafeNew :: forall (sh :: [Maybe Nat]) s. IShX sh -> Int -> ST s (MixedVecs s sh Int) Source #

mvecsNewEmpty :: forall s (sh :: [Maybe Nat]). Proxy Int -> ST s (MixedVecs s sh Int) Source #

Storable a => KnownElt (Primitive a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

memptyArrayUnsafe :: forall (sh :: [Maybe Nat]). IShX sh -> Mixed sh (Primitive a) Source #

mvecsUnsafeNew :: forall (sh :: [Maybe Nat]) s. IShX sh -> Primitive a -> ST s (MixedVecs s sh (Primitive a)) Source #

mvecsNewEmpty :: forall s (sh :: [Maybe Nat]). Proxy (Primitive a) -> ST s (MixedVecs s sh (Primitive a)) Source #

(KnownShX sh', KnownElt a) => KnownElt (Mixed sh' a) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

memptyArrayUnsafe :: forall (sh :: [Maybe Nat]). IShX sh -> Mixed sh (Mixed sh' a) Source #

mvecsUnsafeNew :: forall (sh :: [Maybe Nat]) s. IShX sh -> Mixed sh' a -> ST s (MixedVecs s sh (Mixed sh' a)) Source #

mvecsNewEmpty :: forall s (sh :: [Maybe Nat]). Proxy (Mixed sh' a) -> ST s (MixedVecs s sh (Mixed sh' a)) Source #

(KnownNat n, KnownElt a) => KnownElt (Ranked n a) Source # 
Instance details

Defined in Data.Array.Nested.Ranked.Base

Methods

memptyArrayUnsafe :: forall (sh :: [Maybe Nat]). IShX sh -> Mixed sh (Ranked n a) Source #

mvecsUnsafeNew :: forall (sh :: [Maybe Nat]) s. IShX sh -> Ranked n a -> ST s (MixedVecs s sh (Ranked n a)) Source #

mvecsNewEmpty :: forall s (sh :: [Maybe Nat]). Proxy (Ranked n a) -> ST s (MixedVecs s sh (Ranked n a)) Source #

(KnownShS sh, KnownElt a) => KnownElt (Shaped sh a) Source # 
Instance details

Defined in Data.Array.Nested.Shaped.Base

Methods

memptyArrayUnsafe :: forall (sh0 :: [Maybe Nat]). IShX sh0 -> Mixed sh0 (Shaped sh a) Source #

mvecsUnsafeNew :: forall (sh0 :: [Maybe Nat]) s. IShX sh0 -> Shaped sh a -> ST s (MixedVecs s sh0 (Shaped sh a)) Source #

mvecsNewEmpty :: forall s (sh0 :: [Maybe Nat]). Proxy (Shaped sh a) -> ST s (MixedVecs s sh0 (Shaped sh a)) Source #

(KnownElt a, KnownElt b) => KnownElt (a, b) Source # 
Instance details

Defined in Data.Array.Nested.Mixed

Methods

memptyArrayUnsafe :: forall (sh :: [Maybe Nat]). IShX sh -> Mixed sh (a, b) Source #

mvecsUnsafeNew :: forall (sh :: [Maybe Nat]) s. IShX sh -> (a, b) -> ST s (MixedVecs s sh (a, b)) Source #

mvecsNewEmpty :: forall s (sh :: [Maybe Nat]). Proxy (a, b) -> ST s (MixedVecs s sh (a, b)) Source #

Further utilities / re-exports

type family (l1 :: [a]) ++ (l2 :: [a]) :: [a] where ... Source #

Type-level list append.

Equations

('[] :: [a]) ++ (l2 :: [a]) = l2 
(x ': xs :: [a]) ++ (l2 :: [a]) = x ': (xs ++ l2) 

class Storable a #

The member functions of this class facilitate writing values of primitive types to raw memory (which may have been allocated with the above mentioned routines) and reading values from blocks of raw memory. The class, furthermore, includes support for computing the storage requirements and alignment restrictions of storable types.

Memory addresses are represented as values of type Ptr a, for some a which is an instance of class Storable. The type argument to Ptr helps provide some valuable type safety in FFI code (you can't mix pointers of different types without an explicit cast), while helping the Haskell type system figure out which marshalling method is needed for a given pointer.

All marshalling between Haskell and a foreign language ultimately boils down to translating Haskell data structures into the binary representation of a corresponding data structure of the foreign language and vice versa. To code this marshalling in Haskell, it is necessary to manipulate primitive data types stored in unstructured memory blocks. The class Storable facilitates this manipulation on all types for which it is instantiated, which are the standard basic types of Haskell, the fixed size Int types (Int8, Int16, Int32, Int64), the fixed size Word types (Word8, Word16, Word32, Word64), StablePtr, all types from Foreign.C.Types, as well as Ptr.

Minimal complete definition

sizeOf, alignment, (peek | peekElemOff | peekByteOff), (poke | pokeElemOff | pokeByteOff)

Instances

Instances details
Storable CBool 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CBool -> Int #

alignment :: CBool -> Int #

peekElemOff :: Ptr CBool -> Int -> IO CBool #

pokeElemOff :: Ptr CBool -> Int -> CBool -> IO () #

peekByteOff :: Ptr b -> Int -> IO CBool #

pokeByteOff :: Ptr b -> Int -> CBool -> IO () #

peek :: Ptr CBool -> IO CBool #

poke :: Ptr CBool -> CBool -> IO () #

Storable CChar 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CChar -> Int #

alignment :: CChar -> Int #

peekElemOff :: Ptr CChar -> Int -> IO CChar #

pokeElemOff :: Ptr CChar -> Int -> CChar -> IO () #

peekByteOff :: Ptr b -> Int -> IO CChar #

pokeByteOff :: Ptr b -> Int -> CChar -> IO () #

peek :: Ptr CChar -> IO CChar #

poke :: Ptr CChar -> CChar -> IO () #

Storable CClock 
Instance details

Defined in Foreign.C.Types

Storable CDouble 
Instance details

Defined in Foreign.C.Types

Storable CFloat 
Instance details

Defined in Foreign.C.Types

Storable CInt 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CInt -> Int #

alignment :: CInt -> Int #

peekElemOff :: Ptr CInt -> Int -> IO CInt #

pokeElemOff :: Ptr CInt -> Int -> CInt -> IO () #

peekByteOff :: Ptr b -> Int -> IO CInt #

pokeByteOff :: Ptr b -> Int -> CInt -> IO () #

peek :: Ptr CInt -> IO CInt #

poke :: Ptr CInt -> CInt -> IO () #

Storable CIntMax 
Instance details

Defined in Foreign.C.Types

Storable CIntPtr 
Instance details

Defined in Foreign.C.Types

Storable CLLong 
Instance details

Defined in Foreign.C.Types

Storable CLong 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CLong -> Int #

alignment :: CLong -> Int #

peekElemOff :: Ptr CLong -> Int -> IO CLong #

pokeElemOff :: Ptr CLong -> Int -> CLong -> IO () #

peekByteOff :: Ptr b -> Int -> IO CLong #

pokeByteOff :: Ptr b -> Int -> CLong -> IO () #

peek :: Ptr CLong -> IO CLong #

poke :: Ptr CLong -> CLong -> IO () #

Storable CPtrdiff 
Instance details

Defined in Foreign.C.Types

Storable CSChar 
Instance details

Defined in Foreign.C.Types

Storable CSUSeconds 
Instance details

Defined in Foreign.C.Types

Storable CShort 
Instance details

Defined in Foreign.C.Types

Storable CSigAtomic 
Instance details

Defined in Foreign.C.Types

Storable CSize 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CSize -> Int #

alignment :: CSize -> Int #

peekElemOff :: Ptr CSize -> Int -> IO CSize #

pokeElemOff :: Ptr CSize -> Int -> CSize -> IO () #

peekByteOff :: Ptr b -> Int -> IO CSize #

pokeByteOff :: Ptr b -> Int -> CSize -> IO () #

peek :: Ptr CSize -> IO CSize #

poke :: Ptr CSize -> CSize -> IO () #

Storable CTime 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CTime -> Int #

alignment :: CTime -> Int #

peekElemOff :: Ptr CTime -> Int -> IO CTime #

pokeElemOff :: Ptr CTime -> Int -> CTime -> IO () #

peekByteOff :: Ptr b -> Int -> IO CTime #

pokeByteOff :: Ptr b -> Int -> CTime -> IO () #

peek :: Ptr CTime -> IO CTime #

poke :: Ptr CTime -> CTime -> IO () #

Storable CUChar 
Instance details

Defined in Foreign.C.Types

Storable CUInt 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CUInt -> Int #

alignment :: CUInt -> Int #

peekElemOff :: Ptr CUInt -> Int -> IO CUInt #

pokeElemOff :: Ptr CUInt -> Int -> CUInt -> IO () #

peekByteOff :: Ptr b -> Int -> IO CUInt #

pokeByteOff :: Ptr b -> Int -> CUInt -> IO () #

peek :: Ptr CUInt -> IO CUInt #

poke :: Ptr CUInt -> CUInt -> IO () #

Storable CUIntMax 
Instance details

Defined in Foreign.C.Types

Storable CUIntPtr 
Instance details

Defined in Foreign.C.Types

Storable CULLong 
Instance details

Defined in Foreign.C.Types

Storable CULong 
Instance details

Defined in Foreign.C.Types

Storable CUSeconds 
Instance details

Defined in Foreign.C.Types

Storable CUShort 
Instance details

Defined in Foreign.C.Types

Storable CWchar 
Instance details

Defined in Foreign.C.Types

Storable IntPtr 
Instance details

Defined in Foreign.Ptr

Storable WordPtr 
Instance details

Defined in Foreign.Ptr

Storable Fingerprint

Since: base-4.4.0.0

Instance details

Defined in Foreign.Storable

Storable Int16

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int16 -> Int #

alignment :: Int16 -> Int #

peekElemOff :: Ptr Int16 -> Int -> IO Int16 #

pokeElemOff :: Ptr Int16 -> Int -> Int16 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int16 #

pokeByteOff :: Ptr b -> Int -> Int16 -> IO () #

peek :: Ptr Int16 -> IO Int16 #

poke :: Ptr Int16 -> Int16 -> IO () #

Storable Int32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int32 -> Int #

alignment :: Int32 -> Int #

peekElemOff :: Ptr Int32 -> Int -> IO Int32 #

pokeElemOff :: Ptr Int32 -> Int -> Int32 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int32 #

pokeByteOff :: Ptr b -> Int -> Int32 -> IO () #

peek :: Ptr Int32 -> IO Int32 #

poke :: Ptr Int32 -> Int32 -> IO () #

Storable Int64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int64 -> Int #

alignment :: Int64 -> Int #

peekElemOff :: Ptr Int64 -> Int -> IO Int64 #

pokeElemOff :: Ptr Int64 -> Int -> Int64 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int64 #

pokeByteOff :: Ptr b -> Int -> Int64 -> IO () #

peek :: Ptr Int64 -> IO Int64 #

poke :: Ptr Int64 -> Int64 -> IO () #

Storable Int8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int8 -> Int #

alignment :: Int8 -> Int #

peekElemOff :: Ptr Int8 -> Int -> IO Int8 #

pokeElemOff :: Ptr Int8 -> Int -> Int8 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int8 #

pokeByteOff :: Ptr b -> Int -> Int8 -> IO () #

peek :: Ptr Int8 -> IO Int8 #

poke :: Ptr Int8 -> Int8 -> IO () #

Storable IoSubSystem

Since: base-4.9.0.0

Instance details

Defined in GHC.RTS.Flags

Storable Word16

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Word32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Word64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Word8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Word8 -> Int #

alignment :: Word8 -> Int #

peekElemOff :: Ptr Word8 -> Int -> IO Word8 #

pokeElemOff :: Ptr Word8 -> Int -> Word8 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Word8 #

pokeByteOff :: Ptr b -> Int -> Word8 -> IO () #

peek :: Ptr Word8 -> IO Word8 #

poke :: Ptr Word8 -> Word8 -> IO () #

Storable CBlkCnt 
Instance details

Defined in System.Posix.Types

Storable CBlkSize 
Instance details

Defined in System.Posix.Types

Storable CCc 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CCc -> Int #

alignment :: CCc -> Int #

peekElemOff :: Ptr CCc -> Int -> IO CCc #

pokeElemOff :: Ptr CCc -> Int -> CCc -> IO () #

peekByteOff :: Ptr b -> Int -> IO CCc #

pokeByteOff :: Ptr b -> Int -> CCc -> IO () #

peek :: Ptr CCc -> IO CCc #

poke :: Ptr CCc -> CCc -> IO () #

Storable CClockId 
Instance details

Defined in System.Posix.Types

Storable CDev 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CDev -> Int #

alignment :: CDev -> Int #

peekElemOff :: Ptr CDev -> Int -> IO CDev #

pokeElemOff :: Ptr CDev -> Int -> CDev -> IO () #

peekByteOff :: Ptr b -> Int -> IO CDev #

pokeByteOff :: Ptr b -> Int -> CDev -> IO () #

peek :: Ptr CDev -> IO CDev #

poke :: Ptr CDev -> CDev -> IO () #

Storable CFsBlkCnt 
Instance details

Defined in System.Posix.Types

Storable CFsFilCnt 
Instance details

Defined in System.Posix.Types

Storable CGid 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CGid -> Int #

alignment :: CGid -> Int #

peekElemOff :: Ptr CGid -> Int -> IO CGid #

pokeElemOff :: Ptr CGid -> Int -> CGid -> IO () #

peekByteOff :: Ptr b -> Int -> IO CGid #

pokeByteOff :: Ptr b -> Int -> CGid -> IO () #

peek :: Ptr CGid -> IO CGid #

poke :: Ptr CGid -> CGid -> IO () #

Storable CId 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CId -> Int #

alignment :: CId -> Int #

peekElemOff :: Ptr CId -> Int -> IO CId #

pokeElemOff :: Ptr CId -> Int -> CId -> IO () #

peekByteOff :: Ptr b -> Int -> IO CId #

pokeByteOff :: Ptr b -> Int -> CId -> IO () #

peek :: Ptr CId -> IO CId #

poke :: Ptr CId -> CId -> IO () #

Storable CIno 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CIno -> Int #

alignment :: CIno -> Int #

peekElemOff :: Ptr CIno -> Int -> IO CIno #

pokeElemOff :: Ptr CIno -> Int -> CIno -> IO () #

peekByteOff :: Ptr b -> Int -> IO CIno #

pokeByteOff :: Ptr b -> Int -> CIno -> IO () #

peek :: Ptr CIno -> IO CIno #

poke :: Ptr CIno -> CIno -> IO () #

Storable CKey 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CKey -> Int #

alignment :: CKey -> Int #

peekElemOff :: Ptr CKey -> Int -> IO CKey #

pokeElemOff :: Ptr CKey -> Int -> CKey -> IO () #

peekByteOff :: Ptr b -> Int -> IO CKey #

pokeByteOff :: Ptr b -> Int -> CKey -> IO () #

peek :: Ptr CKey -> IO CKey #

poke :: Ptr CKey -> CKey -> IO () #

Storable CMode 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CMode -> Int #

alignment :: CMode -> Int #

peekElemOff :: Ptr CMode -> Int -> IO CMode #

pokeElemOff :: Ptr CMode -> Int -> CMode -> IO () #

peekByteOff :: Ptr b -> Int -> IO CMode #

pokeByteOff :: Ptr b -> Int -> CMode -> IO () #

peek :: Ptr CMode -> IO CMode #

poke :: Ptr CMode -> CMode -> IO () #

Storable CNfds 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CNfds -> Int #

alignment :: CNfds -> Int #

peekElemOff :: Ptr CNfds -> Int -> IO CNfds #

pokeElemOff :: Ptr CNfds -> Int -> CNfds -> IO () #

peekByteOff :: Ptr b -> Int -> IO CNfds #

pokeByteOff :: Ptr b -> Int -> CNfds -> IO () #

peek :: Ptr CNfds -> IO CNfds #

poke :: Ptr CNfds -> CNfds -> IO () #

Storable CNlink 
Instance details

Defined in System.Posix.Types

Storable COff 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: COff -> Int #

alignment :: COff -> Int #

peekElemOff :: Ptr COff -> Int -> IO COff #

pokeElemOff :: Ptr COff -> Int -> COff -> IO () #

peekByteOff :: Ptr b -> Int -> IO COff #

pokeByteOff :: Ptr b -> Int -> COff -> IO () #

peek :: Ptr COff -> IO COff #

poke :: Ptr COff -> COff -> IO () #

Storable CPid 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CPid -> Int #

alignment :: CPid -> Int #

peekElemOff :: Ptr CPid -> Int -> IO CPid #

pokeElemOff :: Ptr CPid -> Int -> CPid -> IO () #

peekByteOff :: Ptr b -> Int -> IO CPid #

pokeByteOff :: Ptr b -> Int -> CPid -> IO () #

peek :: Ptr CPid -> IO CPid #

poke :: Ptr CPid -> CPid -> IO () #

Storable CRLim 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CRLim -> Int #

alignment :: CRLim -> Int #

peekElemOff :: Ptr CRLim -> Int -> IO CRLim #

pokeElemOff :: Ptr CRLim -> Int -> CRLim -> IO () #

peekByteOff :: Ptr b -> Int -> IO CRLim #

pokeByteOff :: Ptr b -> Int -> CRLim -> IO () #

peek :: Ptr CRLim -> IO CRLim #

poke :: Ptr CRLim -> CRLim -> IO () #

Storable CSocklen 
Instance details

Defined in System.Posix.Types

Storable CSpeed 
Instance details

Defined in System.Posix.Types

Storable CSsize 
Instance details

Defined in System.Posix.Types

Storable CTcflag 
Instance details

Defined in System.Posix.Types

Storable CTimer 
Instance details

Defined in System.Posix.Types

Storable CUid 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CUid -> Int #

alignment :: CUid -> Int #

peekElemOff :: Ptr CUid -> Int -> IO CUid #

pokeElemOff :: Ptr CUid -> Int -> CUid -> IO () #

peekByteOff :: Ptr b -> Int -> IO CUid #

pokeByteOff :: Ptr b -> Int -> CUid -> IO () #

peek :: Ptr CUid -> IO CUid #

poke :: Ptr CUid -> CUid -> IO () #

Storable Fd 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: Fd -> Int #

alignment :: Fd -> Int #

peekElemOff :: Ptr Fd -> Int -> IO Fd #

pokeElemOff :: Ptr Fd -> Int -> Fd -> IO () #

peekByteOff :: Ptr b -> Int -> IO Fd #

pokeByteOff :: Ptr b -> Int -> Fd -> IO () #

peek :: Ptr Fd -> IO Fd #

poke :: Ptr Fd -> Fd -> IO () #

Storable ()

Since: base-4.9.0.0

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: () -> Int #

alignment :: () -> Int #

peekElemOff :: Ptr () -> Int -> IO () #

pokeElemOff :: Ptr () -> Int -> () -> IO () #

peekByteOff :: Ptr b -> Int -> IO () #

pokeByteOff :: Ptr b -> Int -> () -> IO () #

peek :: Ptr () -> IO () #

poke :: Ptr () -> () -> IO () #

Storable Bool

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Bool -> Int #

alignment :: Bool -> Int #

peekElemOff :: Ptr Bool -> Int -> IO Bool #

pokeElemOff :: Ptr Bool -> Int -> Bool -> IO () #

peekByteOff :: Ptr b -> Int -> IO Bool #

pokeByteOff :: Ptr b -> Int -> Bool -> IO () #

peek :: Ptr Bool -> IO Bool #

poke :: Ptr Bool -> Bool -> IO () #

Storable Char

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Char -> Int #

alignment :: Char -> Int #

peekElemOff :: Ptr Char -> Int -> IO Char #

pokeElemOff :: Ptr Char -> Int -> Char -> IO () #

peekByteOff :: Ptr b -> Int -> IO Char #

pokeByteOff :: Ptr b -> Int -> Char -> IO () #

peek :: Ptr Char -> IO Char #

poke :: Ptr Char -> Char -> IO () #

Storable Double

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Float

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Float -> Int #

alignment :: Float -> Int #

peekElemOff :: Ptr Float -> Int -> IO Float #

pokeElemOff :: Ptr Float -> Int -> Float -> IO () #

peekByteOff :: Ptr b -> Int -> IO Float #

pokeByteOff :: Ptr b -> Int -> Float -> IO () #

peek :: Ptr Float -> IO Float #

poke :: Ptr Float -> Float -> IO () #

Storable Int

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int -> Int #

alignment :: Int -> Int #

peekElemOff :: Ptr Int -> Int -> IO Int #

pokeElemOff :: Ptr Int -> Int -> Int -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int #

pokeByteOff :: Ptr b -> Int -> Int -> IO () #

peek :: Ptr Int -> IO Int #

poke :: Ptr Int -> Int -> IO () #

Storable Word

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Word -> Int #

alignment :: Word -> Int #

peekElemOff :: Ptr Word -> Int -> IO Word #

pokeElemOff :: Ptr Word -> Int -> Word -> IO () #

peekByteOff :: Ptr b -> Int -> IO Word #

pokeByteOff :: Ptr b -> Int -> Word -> IO () #

peek :: Ptr Word -> IO Word #

poke :: Ptr Word -> Word -> IO () #

Storable a => Storable (Complex a)

Since: base-4.8.0.0

Instance details

Defined in Data.Complex

Methods

sizeOf :: Complex a -> Int #

alignment :: Complex a -> Int #

peekElemOff :: Ptr (Complex a) -> Int -> IO (Complex a) #

pokeElemOff :: Ptr (Complex a) -> Int -> Complex a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Complex a) #

pokeByteOff :: Ptr b -> Int -> Complex a -> IO () #

peek :: Ptr (Complex a) -> IO (Complex a) #

poke :: Ptr (Complex a) -> Complex a -> IO () #

Storable a => Storable (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

sizeOf :: Identity a -> Int #

alignment :: Identity a -> Int #

peekElemOff :: Ptr (Identity a) -> Int -> IO (Identity a) #

pokeElemOff :: Ptr (Identity a) -> Int -> Identity a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Identity a) #

pokeByteOff :: Ptr b -> Int -> Identity a -> IO () #

peek :: Ptr (Identity a) -> IO (Identity a) #

poke :: Ptr (Identity a) -> Identity a -> IO () #

Storable a => Storable (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

sizeOf :: Down a -> Int #

alignment :: Down a -> Int #

peekElemOff :: Ptr (Down a) -> Int -> IO (Down a) #

pokeElemOff :: Ptr (Down a) -> Int -> Down a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Down a) #

pokeByteOff :: Ptr b -> Int -> Down a -> IO () #

peek :: Ptr (Down a) -> IO (Down a) #

poke :: Ptr (Down a) -> Down a -> IO () #

Storable (ConstPtr a) 
Instance details

Defined in Foreign.Storable

Methods

sizeOf :: ConstPtr a -> Int #

alignment :: ConstPtr a -> Int #

peekElemOff :: Ptr (ConstPtr a) -> Int -> IO (ConstPtr a) #

pokeElemOff :: Ptr (ConstPtr a) -> Int -> ConstPtr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (ConstPtr a) #

pokeByteOff :: Ptr b -> Int -> ConstPtr a -> IO () #

peek :: Ptr (ConstPtr a) -> IO (ConstPtr a) #

poke :: Ptr (ConstPtr a) -> ConstPtr a -> IO () #

Storable (FunPtr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: FunPtr a -> Int #

alignment :: FunPtr a -> Int #

peekElemOff :: Ptr (FunPtr a) -> Int -> IO (FunPtr a) #

pokeElemOff :: Ptr (FunPtr a) -> Int -> FunPtr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (FunPtr a) #

pokeByteOff :: Ptr b -> Int -> FunPtr a -> IO () #

peek :: Ptr (FunPtr a) -> IO (FunPtr a) #

poke :: Ptr (FunPtr a) -> FunPtr a -> IO () #

Storable (Ptr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Ptr a -> Int #

alignment :: Ptr a -> Int #

peekElemOff :: Ptr (Ptr a) -> Int -> IO (Ptr a) #

pokeElemOff :: Ptr (Ptr a) -> Int -> Ptr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Ptr a) #

pokeByteOff :: Ptr b -> Int -> Ptr a -> IO () #

peek :: Ptr (Ptr a) -> IO (Ptr a) #

poke :: Ptr (Ptr a) -> Ptr a -> IO () #

(Storable a, Integral a) => Storable (Ratio a)

Since: base-4.8.0.0

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Ratio a -> Int #

alignment :: Ratio a -> Int #

peekElemOff :: Ptr (Ratio a) -> Int -> IO (Ratio a) #

pokeElemOff :: Ptr (Ratio a) -> Int -> Ratio a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Ratio a) #

pokeByteOff :: Ptr b -> Int -> Ratio a -> IO () #

peek :: Ptr (Ratio a) -> IO (Ratio a) #

poke :: Ptr (Ratio a) -> Ratio a -> IO () #

Storable (StablePtr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: StablePtr a -> Int #

alignment :: StablePtr a -> Int #

peekElemOff :: Ptr (StablePtr a) -> Int -> IO (StablePtr a) #

pokeElemOff :: Ptr (StablePtr a) -> Int -> StablePtr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (StablePtr a) #

pokeByteOff :: Ptr b -> Int -> StablePtr a -> IO () #

peek :: Ptr (StablePtr a) -> IO (StablePtr a) #

poke :: Ptr (StablePtr a) -> StablePtr a -> IO () #

Storable g => Storable (StateGen g) 
Instance details

Defined in System.Random.Internal

Methods

sizeOf :: StateGen g -> Int #

alignment :: StateGen g -> Int #

peekElemOff :: Ptr (StateGen g) -> Int -> IO (StateGen g) #

pokeElemOff :: Ptr (StateGen g) -> Int -> StateGen g -> IO () #

peekByteOff :: Ptr b -> Int -> IO (StateGen g) #

pokeByteOff :: Ptr b -> Int -> StateGen g -> IO () #

peek :: Ptr (StateGen g) -> IO (StateGen g) #

poke :: Ptr (StateGen g) -> StateGen g -> IO () #

Storable a => Storable (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

sizeOf :: Const a b -> Int #

alignment :: Const a b -> Int #

peekElemOff :: Ptr (Const a b) -> Int -> IO (Const a b) #

pokeElemOff :: Ptr (Const a b) -> Int -> Const a b -> IO () #

peekByteOff :: Ptr b0 -> Int -> IO (Const a b) #

pokeByteOff :: Ptr b0 -> Int -> Const a b -> IO () #

peek :: Ptr (Const a b) -> IO (Const a b) #

poke :: Ptr (Const a b) -> Const a b -> IO () #

data SNat (n :: Nat) #

A value-level witness for a type-level natural number. This is commonly referred to as a singleton type, as for each n, there is a single value that inhabits the type SNat n (aside from bottom).

The definition of SNat is intentionally left abstract. To obtain an SNat value, use one of the following:

  1. The natSing method of KnownNat.
  2. The SNat pattern synonym.
  3. The withSomeSNat function, which creates an SNat from a Natural number.

Since: base-4.18.0.0

Instances

Instances details
TestCoercion SNat

Since: base-4.18.0.0

Instance details

Defined in GHC.TypeNats

Methods

testCoercion :: forall (a :: Nat) (b :: Nat). SNat a -> SNat b -> Maybe (Coercion a b) #

TestEquality SNat

Since: base-4.18.0.0

Instance details

Defined in GHC.TypeNats

Methods

testEquality :: forall (a :: Nat) (b :: Nat). SNat a -> SNat b -> Maybe (a :~: b) #

Show (SNat n)

Since: base-4.18.0.0

Instance details

Defined in GHC.TypeNats

Methods

showsPrec :: Int -> SNat n -> ShowS #

show :: SNat n -> String #

showList :: [SNat n] -> ShowS #

Eq (SNat n)

Since: base-4.19.0.0

Instance details

Defined in GHC.TypeNats

Methods

(==) :: SNat n -> SNat n -> Bool #

(/=) :: SNat n -> SNat n -> Bool #

Ord (SNat n)

Since: base-4.19.0.0

Instance details

Defined in GHC.TypeNats

Methods

compare :: SNat n -> SNat n -> Ordering #

(<) :: SNat n -> SNat n -> Bool #

(<=) :: SNat n -> SNat n -> Bool #

(>) :: SNat n -> SNat n -> Bool #

(>=) :: SNat n -> SNat n -> Bool #

max :: SNat n -> SNat n -> SNat n #

min :: SNat n -> SNat n -> SNat n #

pattern SNat :: () => KnownNat n => SNat n #

A explicitly bidirectional pattern synonym relating an SNat to a KnownNat constraint.

As an expression: Constructs an explicit SNat n value from an implicit KnownNat n constraint:

SNat @n :: KnownNat n => SNat n

As a pattern: Matches on an explicit SNat n value bringing an implicit KnownNat n constraint into scope:

f :: SNat n -> ..
f SNat = {- SNat n in scope -}

Since: base-4.18.0.0

pattern SZ :: () => n ~ 0 => SNat n Source #

pattern SS :: forall np1 n. () => (n + 1) ~ np1 => SNat n -> SNat np1 Source #

data Perm (list :: [Nat]) where Source #

A "backward" permutation of a dimension list. The operation on the dimension list is most similar to backpermute; see Permute for code that implements this.

Constructors

PNil :: Perm ('[] :: [Nat]) 
PCons :: forall (a :: Nat) (l :: [Nat]). SNat a -> Perm l -> Perm (a ': l) infixr 5 

Instances

Instances details
Show (Perm list) Source # 
Instance details

Defined in Data.Array.Nested.Permutation

Methods

showsPrec :: Int -> Perm list -> ShowS #

show :: Perm list -> String #

showList :: [Perm list] -> ShowS #

Eq (Perm list) Source # 
Instance details

Defined in Data.Array.Nested.Permutation

Methods

(==) :: Perm list -> Perm list -> Bool #

(/=) :: Perm list -> Perm list -> Bool #

TestEquality Perm Source # 
Instance details

Defined in Data.Array.Nested.Permutation

Methods

testEquality :: forall (a :: [Nat]) (b :: [Nat]). Perm a -> Perm b -> Maybe (a :~: b) #

type IsPermutation (as :: [Natural]) = (AllElem as (Count 0 (Rank as)), AllElem (Count 0 (Rank as)) as) Source #

class KnownPerm (l :: [Nat]) where Source #

Utility class for generating permutations from type class information.

Methods

makePerm :: Perm l Source #

Instances

Instances details
KnownPerm ('[] :: [Nat]) Source # 
Instance details

Defined in Data.Array.Nested.Permutation

Methods

makePerm :: Perm ('[] :: [Nat]) Source #

(KnownNat n, KnownPerm l) => KnownPerm (n ': l) Source # 
Instance details

Defined in Data.Array.Nested.Permutation

Methods

makePerm :: Perm (n ': l) Source #

class NumElt a #

Instances

Instances details
NumElt CInt 
Instance details

Defined in Data.Array.Strided.Arith.Internal

Methods

numEltAdd :: forall (n :: Nat). SNat n -> Array n CInt -> Array n CInt -> Array n CInt #

numEltSub :: forall (n :: Nat). SNat n -> Array n CInt -> Array n CInt -> Array n CInt #

numEltMul :: forall (n :: Nat). SNat n -> Array n CInt -> Array n CInt -> Array n CInt #

numEltNeg :: forall (n :: Nat). SNat n -> Array n CInt -> Array n CInt #

numEltAbs :: forall (n :: Nat). SNat n -> Array n CInt -> Array n CInt #

numEltSignum :: forall (n :: Nat). SNat n -> Array n CInt -> Array n CInt #

numEltSum1Inner :: forall (n :: Nat). SNat n -> Array (n + 1) CInt -> Array n CInt #

numEltProduct1Inner :: forall (n :: Nat). SNat n -> Array (n + 1) CInt -> Array n CInt #

numEltSumFull :: forall (n :: Nat). SNat n -> Array n CInt -> CInt #

numEltProductFull :: forall (n :: Nat). SNat n -> Array n CInt -> CInt #

numEltMinIndex :: forall (n :: Nat). SNat n -> Array n CInt -> [Int] #

numEltMaxIndex :: forall (n :: Nat). SNat n -> Array n CInt -> [Int] #

numEltDotprodInner :: forall (n :: Nat). SNat n -> Array (n + 1) CInt -> Array (n + 1) CInt -> Array n CInt #

NumElt Int32 
Instance details

Defined in Data.Array.Strided.Arith.Internal

Methods

numEltAdd :: forall (n :: Nat). SNat n -> Array n Int32 -> Array n Int32 -> Array n Int32 #

numEltSub :: forall (n :: Nat). SNat n -> Array n Int32 -> Array n Int32 -> Array n Int32 #

numEltMul :: forall (n :: Nat). SNat n -> Array n Int32 -> Array n Int32 -> Array n Int32 #

numEltNeg :: forall (n :: Nat). SNat n -> Array n Int32 -> Array n Int32 #

numEltAbs :: forall (n :: Nat). SNat n -> Array n Int32 -> Array n Int32 #

numEltSignum :: forall (n :: Nat). SNat n -> Array n Int32 -> Array n Int32 #

numEltSum1Inner :: forall (n :: Nat). SNat n -> Array (n + 1) Int32 -> Array n Int32 #

numEltProduct1Inner :: forall (n :: Nat). SNat n -> Array (n + 1) Int32 -> Array n Int32 #

numEltSumFull :: forall (n :: Nat). SNat n -> Array n Int32 -> Int32 #

numEltProductFull :: forall (n :: Nat). SNat n -> Array n Int32 -> Int32 #

numEltMinIndex :: forall (n :: Nat). SNat n -> Array n Int32 -> [Int] #

numEltMaxIndex :: forall (n :: Nat). SNat n -> Array n Int32 -> [Int] #

numEltDotprodInner :: forall (n :: Nat). SNat n -> Array (n + 1) Int32 -> Array (n + 1) Int32 -> Array n Int32 #

NumElt Int64 
Instance details

Defined in Data.Array.Strided.Arith.Internal

Methods

numEltAdd :: forall (n :: Nat). SNat n -> Array n Int64 -> Array n Int64 -> Array n Int64 #

numEltSub :: forall (n :: Nat). SNat n -> Array n Int64 -> Array n Int64 -> Array n Int64 #

numEltMul :: forall (n :: Nat). SNat n -> Array n Int64 -> Array n Int64 -> Array n Int64 #

numEltNeg :: forall (n :: Nat). SNat n -> Array n Int64 -> Array n Int64 #

numEltAbs :: forall (n :: Nat). SNat n -> Array n Int64 -> Array n Int64 #

numEltSignum :: forall (n :: Nat). SNat n -> Array n Int64 -> Array n Int64 #

numEltSum1Inner :: forall (n :: Nat). SNat n -> Array (n + 1) Int64 -> Array n Int64 #

numEltProduct1Inner :: forall (n :: Nat). SNat n -> Array (n + 1) Int64 -> Array n Int64 #

numEltSumFull :: forall (n :: Nat). SNat n -> Array n Int64 -> Int64 #

numEltProductFull :: forall (n :: Nat). SNat n -> Array n Int64 -> Int64 #

numEltMinIndex :: forall (n :: Nat). SNat n -> Array n Int64 -> [Int] #

numEltMaxIndex :: forall (n :: Nat). SNat n -> Array n Int64 -> [Int] #

numEltDotprodInner :: forall (n :: Nat). SNat n -> Array (n + 1) Int64 -> Array (n + 1) Int64 -> Array n Int64 #

NumElt Double 
Instance details

Defined in Data.Array.Strided.Arith.Internal

Methods

numEltAdd :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double -> Array n Double #

numEltSub :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double -> Array n Double #

numEltMul :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double -> Array n Double #

numEltNeg :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

numEltAbs :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

numEltSignum :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

numEltSum1Inner :: forall (n :: Nat). SNat n -> Array (n + 1) Double -> Array n Double #

numEltProduct1Inner :: forall (n :: Nat). SNat n -> Array (n + 1) Double -> Array n Double #

numEltSumFull :: forall (n :: Nat). SNat n -> Array n Double -> Double #

numEltProductFull :: forall (n :: Nat). SNat n -> Array n Double -> Double #

numEltMinIndex :: forall (n :: Nat). SNat n -> Array n Double -> [Int] #

numEltMaxIndex :: forall (n :: Nat). SNat n -> Array n Double -> [Int] #

numEltDotprodInner :: forall (n :: Nat). SNat n -> Array (n + 1) Double -> Array (n + 1) Double -> Array n Double #

NumElt Float 
Instance details

Defined in Data.Array.Strided.Arith.Internal

Methods

numEltAdd :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float -> Array n Float #

numEltSub :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float -> Array n Float #

numEltMul :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float -> Array n Float #

numEltNeg :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

numEltAbs :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

numEltSignum :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

numEltSum1Inner :: forall (n :: Nat). SNat n -> Array (n + 1) Float -> Array n Float #

numEltProduct1Inner :: forall (n :: Nat). SNat n -> Array (n + 1) Float -> Array n Float #

numEltSumFull :: forall (n :: Nat). SNat n -> Array n Float -> Float #

numEltProductFull :: forall (n :: Nat). SNat n -> Array n Float -> Float #

numEltMinIndex :: forall (n :: Nat). SNat n -> Array n Float -> [Int] #

numEltMaxIndex :: forall (n :: Nat). SNat n -> Array n Float -> [Int] #

numEltDotprodInner :: forall (n :: Nat). SNat n -> Array (n + 1) Float -> Array (n + 1) Float -> Array n Float #

NumElt Int 
Instance details

Defined in Data.Array.Strided.Arith.Internal

Methods

numEltAdd :: forall (n :: Nat). SNat n -> Array n Int -> Array n Int -> Array n Int #

numEltSub :: forall (n :: Nat). SNat n -> Array n Int -> Array n Int -> Array n Int #

numEltMul :: forall (n :: Nat). SNat n -> Array n Int -> Array n Int -> Array n Int #

numEltNeg :: forall (n :: Nat). SNat n -> Array n Int -> Array n Int #

numEltAbs :: forall (n :: Nat). SNat n -> Array n Int -> Array n Int #

numEltSignum :: forall (n :: Nat). SNat n -> Array n Int -> Array n Int #

numEltSum1Inner :: forall (n :: Nat). SNat n -> Array (n + 1) Int -> Array n Int #

numEltProduct1Inner :: forall (n :: Nat). SNat n -> Array (n + 1) Int -> Array n Int #

numEltSumFull :: forall (n :: Nat). SNat n -> Array n Int -> Int #

numEltProductFull :: forall (n :: Nat). SNat n -> Array n Int -> Int #

numEltMinIndex :: forall (n :: Nat). SNat n -> Array n Int -> [Int] #

numEltMaxIndex :: forall (n :: Nat). SNat n -> Array n Int -> [Int] #

numEltDotprodInner :: forall (n :: Nat). SNat n -> Array (n + 1) Int -> Array (n + 1) Int -> Array n Int #

class NumElt a => IntElt a #

Minimal complete definition

intEltQuot, intEltRem

Instances

Instances details
IntElt CInt 
Instance details

Defined in Data.Array.Strided.Arith.Internal

Methods

intEltQuot :: forall (n :: Nat). SNat n -> Array n CInt -> Array n CInt -> Array n CInt #

intEltRem :: forall (n :: Nat). SNat n -> Array n CInt -> Array n CInt -> Array n CInt #

IntElt Int32 
Instance details

Defined in Data.Array.Strided.Arith.Internal

Methods

intEltQuot :: forall (n :: Nat). SNat n -> Array n Int32 -> Array n Int32 -> Array n Int32 #

intEltRem :: forall (n :: Nat). SNat n -> Array n Int32 -> Array n Int32 -> Array n Int32 #

IntElt Int64 
Instance details

Defined in Data.Array.Strided.Arith.Internal

Methods

intEltQuot :: forall (n :: Nat). SNat n -> Array n Int64 -> Array n Int64 -> Array n Int64 #

intEltRem :: forall (n :: Nat). SNat n -> Array n Int64 -> Array n Int64 -> Array n Int64 #

IntElt Int 
Instance details

Defined in Data.Array.Strided.Arith.Internal

Methods

intEltQuot :: forall (n :: Nat). SNat n -> Array n Int -> Array n Int -> Array n Int #

intEltRem :: forall (n :: Nat). SNat n -> Array n Int -> Array n Int -> Array n Int #

class NumElt a => FloatElt a #

Instances

Instances details
FloatElt Double 
Instance details

Defined in Data.Array.Strided.Arith.Internal

Methods

floatEltDiv :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double -> Array n Double #

floatEltPow :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double -> Array n Double #

floatEltLogbase :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double -> Array n Double #

floatEltRecip :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltExp :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltLog :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltSqrt :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltSin :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltCos :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltTan :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltAsin :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltAcos :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltAtan :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltSinh :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltCosh :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltTanh :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltAsinh :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltAcosh :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltAtanh :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltLog1p :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltExpm1 :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltLog1pexp :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltLog1mexp :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double #

floatEltAtan2 :: forall (n :: Nat). SNat n -> Array n Double -> Array n Double -> Array n Double #

FloatElt Float 
Instance details

Defined in Data.Array.Strided.Arith.Internal

Methods

floatEltDiv :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float -> Array n Float #

floatEltPow :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float -> Array n Float #

floatEltLogbase :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float -> Array n Float #

floatEltRecip :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltExp :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltLog :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltSqrt :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltSin :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltCos :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltTan :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltAsin :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltAcos :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltAtan :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltSinh :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltCosh :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltTanh :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltAsinh :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltAcosh :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltAtanh :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltLog1p :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltExpm1 :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltLog1pexp :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltLog1mexp :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float #

floatEltAtan2 :: forall (n :: Nat). SNat n -> Array n Float -> Array n Float -> Array n Float #

type family Rank (sh :: [a]) :: Natural where ... Source #

The length of a type-level list. If the argument is a shape, then the result is the rank of that shape.

Equations

Rank ('[] :: [a]) = 0 
Rank (_1 ': sh :: [a]) = Rank sh + 1 

type family Product (sh :: [Natural]) :: Natural where ... Source #

Equations

Product ('[] :: [Natural]) = 1 
Product (n ': ns) = n * Product ns 

type family Replicate (n :: Natural) (a1 :: a) :: [a] where ... Source #

Equations

Replicate 0 (a2 :: a1) = '[] :: [a1] 
Replicate n (a2 :: a1) = a2 ': Replicate (n - 1) a2 

type family MapJust (l :: [a]) = (r :: [Maybe a]) | r -> a l where ... Source #

Equations

MapJust ('[] :: [a]) = '[] :: [Maybe a] 
MapJust (x ': xs :: [a]) = 'Just x ': MapJust xs