Safe Haskell | None |
---|
This module contains a collection of data types for describing
dimensions of StaticArray
that do not depend on promoted lists and
tuples.
For convenience, it re-exports all of Foreign.Marshal.StaticArray.
- module Foreign.Marshal.StaticArray
- data a :. b
- data Nil
- data D2 a b
- data D3 a b c
- data D4 a b c d
- data D5 a b c d e
- data D6 a b c d e f
- data D7 a b c d e f g
- data D8 a b c d e f g h
- data D9 a b c d e f g h i
- data D10 a b c d e f g h i j
- data D11 a b c d e f g h i j k
- data D12 a b c d e f g h i j k l
- data D13 a b c d e f g h i j k l m
Documentation
module Foreign.Marshal.StaticArray
:.
is provided as an alternative means of constructing a
type-level list of dimensions. DataKinds
-promoted lists are also
supported and easier to use in almost all cases. The exception is
when CPP
is involved, when a single '
on a line causes CPP
to
fail.
With TypeOperators
and DataKinds
enabled,
is equivalent to StaticArray
UArray
(2:.10:.25:.Nil
) Int
and both wrap a StaticArray
UArray
'[2,10,25] Int
with bounds UArray
(Int
,(Int
,Int
)) Int
((0,(0,0)),(1,(9,24)))
.
Neither promoted lists nor this approach support creating
0-dimensional arrays, because they make no sense with
Storable
.
(SingI Nat n, StaticSize * (:. k k1 n2 ns)) => StaticSize * (:. Nat * n (:. k k1 n2 ns)) | |
SingI Nat n => StaticSize * (:. Nat * n Nil) |
An alternative dimension type to promoted pairs, provided for
syntactic compatibility with CPP
.
An alternative dimension type to promoted triples, provided for
syntactic compatibility with CPP
.
An alternative dimension type to promoted 4-tuples, provided for
syntactic compatibility with CPP
.
An alternative dimension type to promoted 5-tuples, provided for
syntactic compatibility with CPP
.
An alternative dimension type to promoted 6-tuples, provided for
syntactic compatibility with CPP
.
An alternative dimension type to promoted 7-tuples, provided for
syntactic compatibility with CPP
.
data D8 a b c d e f g h Source
An alternative dimension type to promoted 8-tuples, provided for
syntactic compatibility with CPP
.
data D9 a b c d e f g h i Source
An alternative dimension type to promoted 9-tuples, provided for
syntactic compatibility with CPP
.
data D10 a b c d e f g h i j Source
An alternative dimension type to promoted 10-tuples, provided for
syntactic compatibility with CPP
.
data D11 a b c d e f g h i j k Source
An alternative dimension type to promoted 11-tuples, provided for
syntactic compatibility with CPP
.
data D12 a b c d e f g h i j k l Source
An alternative dimension type to promoted 12-tuples, provided for
syntactic compatibility with CPP
.