Module

Data.Tuple.Native

Package
purescript-tuples-native
Repository
athanclark/purescript-tuples-native

Heterogeneous arrays for foreign function interfaces.

#TupleN Source

data TupleN :: RowList -> Type

Represented as a heterogeneous array under the hood

Instances

#T2 Source

type T2 a b = TupleN (Cons "0" a (Cons "1" b Nil))

#T3 Source

type T3 a b c = TupleN (Cons "0" a (Cons "1" b (Cons "2" c Nil)))

#T4 Source

type T4 a b c d = TupleN (Cons "0" a (Cons "1" b (Cons "2" c (Cons "3" d Nil))))

#T5 Source

type T5 a b c d e = TupleN (Cons "0" a (Cons "1" b (Cons "2" c (Cons "3" d (Cons "4" e Nil)))))

#T6 Source

type T6 a b c d e f = TupleN (Cons "0" a (Cons "1" b (Cons "2" c (Cons "3" d (Cons "4" e (Cons "5" f Nil))))))

#T7 Source

type T7 a b c d e f g = TupleN (Cons "0" a (Cons "1" b (Cons "2" c (Cons "3" d (Cons "4" e (Cons "5" f (Cons "6" g Nil)))))))

#T8 Source

type T8 a b c d e f g h = TupleN (Cons "0" a (Cons "1" b (Cons "2" c (Cons "3" d (Cons "4" e (Cons "5" f (Cons "6" g (Cons "7" h Nil))))))))

#T9 Source

type T9 a b c d e f g h i = TupleN (Cons "0" a (Cons "1" b (Cons "2" c (Cons "3" d (Cons "4" e (Cons "5" f (Cons "6" g (Cons "7" h (Cons "8" i Nil)))))))))

#t2 Source

t2 :: forall b a. a -> b -> T2 a b

#t3 Source

t3 :: forall c b a. a -> b -> c -> T3 a b c

#t4 Source

t4 :: forall d c b a. a -> b -> c -> d -> T4 a b c d

#t5 Source

t5 :: forall e d c b a. a -> b -> c -> d -> e -> T5 a b c d e

#t6 Source

t6 :: forall f e d c b a. a -> b -> c -> d -> e -> f -> T6 a b c d e f

#t7 Source

t7 :: forall g f e d c b a. a -> b -> c -> d -> e -> f -> g -> T7 a b c d e f g

#t8 Source

t8 :: forall h g f e d c b a. a -> b -> c -> d -> e -> f -> g -> h -> T8 a b c d e f g h

#t9 Source

t9 :: forall i h g f e d c b a. a -> b -> c -> d -> e -> f -> g -> h -> i -> T9 a b c d e f g h i

#prj Source

prj :: forall size a n' n t'' t' t. TupleSize size t => Lt n size => ShowNat n n' => ListToRow t t' => Cons n' a t'' t' => Nat n => n -> TupleN t -> a

Project a value of index n from a TupleN, using Data.TypeLevel.Num.Reps.dN as Nat values.

#TupleSize Source

class TupleSize n (t :: RowList) | t -> n

Instances

#ShowNat Source

class ShowNat n (s :: Symbol) | n -> s, s -> n

Instances