storable-static-array-0.5.0.1: Statically-sized array wrappers with Storable instances for FFI marshaling

Safe HaskellNone

Foreign.Marshal.StaticArray.Unpromoted

Description

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.

Synopsis

Documentation

data a :. b Source

:. 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, StaticArray UArray (2:.10:.25:.Nil) Int is equivalent to StaticArray UArray '[2,10,25] Int and both wrap a UArray (Int,(Int,Int)) Int with bounds ((0,(0,0)),(1,(9,24))).

Neither promoted lists nor this approach support creating 0-dimensional arrays, because they make no sense with Storable.

Instances

(SingI Nat n, StaticSize * (:. k k1 n2 ns)) => StaticSize * (:. Nat * n (:. k k1 n2 ns)) 
SingI Nat n => StaticSize * (:. Nat * n Nil) 

data Nil Source

Nil is the terminator for type-level lists created with :.

Instances

SingI Nat n => StaticSize * (:. Nat * n Nil) 

data D2 a b Source

An alternative dimension type to promoted pairs, provided for syntactic compatibility with CPP.

Instances

(SingI Nat a, SingI Nat b) => StaticSize * (D2 a b) 

data D3 a b c Source

An alternative dimension type to promoted triples, provided for syntactic compatibility with CPP.

Instances

(SingI Nat a, SingI Nat b, SingI Nat c) => StaticSize * (D3 a b c) 

data D4 a b c d Source

An alternative dimension type to promoted 4-tuples, provided for syntactic compatibility with CPP.

Instances

(SingI Nat a, SingI Nat b, SingI Nat c, SingI Nat d) => StaticSize * (D4 a b c d) 

data D5 a b c d e Source

An alternative dimension type to promoted 5-tuples, provided for syntactic compatibility with CPP.

Instances

(SingI Nat a, SingI Nat b, SingI Nat c, SingI Nat d, SingI Nat e) => StaticSize * (D5 a b c d e) 

data D6 a b c d e f Source

An alternative dimension type to promoted 6-tuples, provided for syntactic compatibility with CPP.

Instances

(SingI Nat a, SingI Nat b, SingI Nat c, SingI Nat d, SingI Nat e, SingI Nat f) => StaticSize * (D6 a b c d e f) 

data D7 a b c d e f g Source

An alternative dimension type to promoted 7-tuples, provided for syntactic compatibility with CPP.

Instances

(SingI Nat a, SingI Nat b, SingI Nat c, SingI Nat d, SingI Nat e, SingI Nat f, SingI Nat g) => StaticSize * (D7 a b c d e f g) 

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.

Instances

(SingI Nat a, SingI Nat b, SingI Nat c, SingI Nat d, SingI Nat e, SingI Nat f, SingI Nat g, SingI Nat h) => StaticSize * (D8 a b c d e f g h) 

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.

Instances

(SingI Nat a, SingI Nat b, SingI Nat c, SingI Nat d, SingI Nat e, SingI Nat f, SingI Nat g, SingI Nat h, SingI Nat i) => StaticSize * (D9 a b c d e f g h i) 

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.

Instances

(SingI Nat a, SingI Nat b, SingI Nat c, SingI Nat d, SingI Nat e, SingI Nat f, SingI Nat g, SingI Nat h, SingI Nat i, SingI Nat j) => StaticSize * (D10 a b c d e f g h i j) 

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.

Instances

(SingI Nat a, SingI Nat b, SingI Nat c, SingI Nat d, SingI Nat e, SingI Nat f, SingI Nat g, SingI Nat h, SingI Nat i, SingI Nat j, SingI Nat k) => StaticSize * (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 Source

An alternative dimension type to promoted 12-tuples, provided for syntactic compatibility with CPP.

Instances

(SingI Nat a, SingI Nat b, SingI Nat c, SingI Nat d, SingI Nat e, SingI Nat f, SingI Nat g, SingI Nat h, SingI Nat i, SingI Nat j, SingI Nat k, SingI Nat l) => StaticSize * (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 Source

An alternative dimension type to promoted 13-tuples, provided for syntactic compatibility with CPP.

Instances

(SingI Nat a, SingI Nat b, SingI Nat c, SingI Nat d, SingI Nat e, SingI Nat f, SingI Nat g, SingI Nat h, SingI Nat i, SingI Nat j, SingI Nat k, SingI Nat l, SingI Nat m) => StaticSize * (D13 a b c d e f g h i j k l m)