aboutsummaryrefslogtreecommitdiff
path: root/src/Data/Array/Nested.hs
blob: 438f144efd60042498e0d9c3d30cdd1d19106351 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{-# LANGUAGE ExplicitNamespaces #-}
{-# LANGUAGE PatternSynonyms #-}
module Data.Array.Nested (
  -- * Ranked arrays
  Ranked(Ranked),
  ListR(ZR, (:::)),
  IxR(.., ZIR, (:.:)), IIxR,
  ShR(.., ZSR, (:$:)),
  rshape, rindex, rindexPartial, rgenerate, rsumOuter1,
  rtranspose, rappend, rscalar, rfromVector, rtoVector, runScalar,
  rconstant, rfromList, rfromList1, rtoList, rtoList1,
  rslice, rrev1, rreshape,
  -- ** Lifting orthotope operations to 'Ranked' arrays
  rlift,
  -- ** Conversions
  rasXArrayPrim, rfromXArrayPrim,
  rcastToShaped,

  -- * Shaped arrays
  Shaped(Shaped),
  ListS(ZS, (::$)),
  IxS(.., ZIS, (:.$)), IIxS,
  ShS(.., ZSS, (:$$)), KnownShS(..),
  sshape, sindex, sindexPartial, sgenerate, ssumOuter1,
  stranspose, sappend, sscalar, sfromVector, stoVector, sunScalar,
  sconstant, sfromList, sfromList1, stoList, stoList1,
  sslice, srev1, sreshape,
  -- ** Lifting orthotope operations to 'Shaped' arrays
  slift,
  -- ** Conversions
  sasXArrayPrim, sfromXArrayPrim,
  stoRanked,

  -- * Mixed arrays
  Mixed,
  IxX(..), IIxX,
  KnownShX(..), StaticShX(..),
  mgenerate, mtranspose, mappend, mfromVector, mtoVector, munScalar,
  mconstant, mfromList, mtoList, mslice, mrev1, mreshape,
  -- ** Conversions
  masXArrayPrim, mfromXArrayPrim,
  mtoRanked, mcastToShaped,

  -- * Array elements
  Elt(mshape, mindex, mindexPartial, mscalar, mfromList1, mtoList1, mlift, mlift2),
  PrimElt,
  Primitive(..),

  -- * Further utilities / re-exports
  type (++),
  Storable,
  SNat, pattern SNat,
  HList,
  Permutation,
  listSToList,
  shSToList,
) where

import Prelude hiding (mappend)

import Data.Array.Mixed
import Data.Array.Nested.Internal
import Foreign.Storable
import GHC.TypeLits