Hs2lib-0.4.8: A Library and Preprocessor that makes it easier to create shared libs from Haskell programs.

Portabilityportable
Stabilityexperimental
Maintainertamar@zhox.com

WinDll.Lib.Tuples

Contents

Description

Module containing definitions for tuples, since those can't be automatically translated. We This file contains predefined mappings of tuples till 8-tuples. If you need more you need to unfortunately add these yourself

Synopsis

The datatypes to replace the tupples with

data Tuple2 a b Source

Constructors

Tuple2 a b 

Instances

Storable a => Functor (Tuple2 a) 
(Storable a, Storable b) => Storable (Tuple2 a b) 
(FFIType a b, FFIType c d, Storable b, Storable d) => FFIType (a, c) (Tuple2Ptr b d) 
(FFIType a b, FFIType c d) => FFIType (a, c) (Tuple2 b d) 

data Tuple3 a b c Source

Constructors

Tuple3 a b c 

Instances

Storable a => Functor (Tuple3 a b) 
(Storable a, Storable b, Storable c) => Storable (Tuple3 a b c) 
(FFIType a b, FFIType c d, FFIType e f, Storable b, Storable d, Storable f) => FFIType (a, c, e) (Tuple3Ptr b d f) 
(FFIType a b, FFIType c d, FFIType e f) => FFIType (a, c, e) (Tuple3 b d f) 

data Tuple4 a b c d Source

Constructors

Tuple4 a b c d 

Instances

Storable a => Functor (Tuple4 a b c) 
(Storable a, Storable b, Storable c, Storable d) => Storable (Tuple4 a b c d) 
(FFIType a b, FFIType c d, FFIType e f, FFIType g h, Storable b, Storable d, Storable f, Storable h) => FFIType (a, c, e, g) (Tuple4Ptr b d f h) 
(FFIType a b, FFIType c d, FFIType e f, FFIType g h) => FFIType (a, c, e, g) (Tuple4 b d f h) 

data Tuple5 a b c d e Source

Constructors

Tuple5 a b c d e 

Instances

Storable a => Functor (Tuple5 a b c d) 
(Storable a, Storable b, Storable c, Storable d, Storable e) => Storable (Tuple5 a b c d e) 
(FFIType a b, FFIType c d, FFIType e f, FFIType g h, FFIType i j, Storable j, Storable b, Storable d, Storable f, Storable h) => FFIType (a, c, e, g, i) (Tuple5Ptr b d f h j) 
(FFIType a b, FFIType c d, FFIType e f, FFIType g h, FFIType i j) => FFIType (a, c, e, g, i) (Tuple5 b d f h j) 

data Tuple6 a b c d e f Source

Constructors

Tuple6 a b c d e f 

Instances

Storable a => Functor (Tuple6 a b c d e) 
(Storable a, Storable b, Storable c, Storable d, Storable e, Storable f) => Storable (Tuple6 a b c d e f) 
(FFIType a b, FFIType c d, FFIType e f, FFIType g h, FFIType i j, FFIType k l, Storable j, Storable l, Storable b, Storable d, Storable f, Storable h) => FFIType (a, c, e, g, i, k) (Tuple6Ptr b d f h j l) 
(FFIType a b, FFIType c d, FFIType e f, FFIType g h, FFIType i j, FFIType k l) => FFIType (a, c, e, g, i, k) (Tuple6 b d f h j l) 

data Tuple7 a b c d e f g Source

Constructors

Tuple7 a b c d e f g 

Instances

Storable a => Functor (Tuple7 a b c d e f) 
(Storable a, Storable b, Storable c, Storable d, Storable e, Storable f, Storable g) => Storable (Tuple7 a b c d e f g) 
(FFIType a b, FFIType c d, FFIType e f, FFIType g h, FFIType i j, FFIType k l, FFIType m n, Storable n, Storable j, Storable l, Storable b, Storable d, Storable f, Storable h) => FFIType (a, c, e, g, i, k, m) (Tuple7Ptr b d f h j l n) 
(FFIType a b, FFIType c d, FFIType e f, FFIType g h, FFIType i j, FFIType k l, FFIType m n) => FFIType (a, c, e, g, i, k, m) (Tuple7 b d f h j l n) 

data Tuple8 a b c d e f g h Source

Constructors

Tuple8 a b c d e f g h 

Instances

Storable a => Functor (Tuple8 a b c d e f g) 
(Storable a, Storable b, Storable c, Storable d, Storable e, Storable f, Storable g, Storable h) => Storable (Tuple8 a b c d e f g h) 
(FFIType a b, FFIType c d, FFIType e f, FFIType g h, FFIType i j, FFIType k l, FFIType m n, FFIType o p, Storable n, Storable p, Storable j, Storable l, Storable b, Storable d, Storable f, Storable h) => FFIType (a, c, e, g, i, k, m, o) (Tuple8Ptr b d f h j l n p) 
(FFIType a b, FFIType c d, FFIType e f, FFIType g h, FFIType i j, FFIType k l, FFIType m n, FFIType o p) => FFIType (a, c, e, g, i, k, m, o) (Tuple8 b d f h j l n p) 

Type namings

type Tuple2Ptr a b = Ptr (Tuple2 a b)Source

type Tuple3Ptr a b c = Ptr (Tuple3 a b c)Source

type Tuple4Ptr a b c d = Ptr (Tuple4 a b c d)Source

type Tuple5Ptr a b c d e = Ptr (Tuple5 a b c d e)Source

type Tuple6Ptr a b c d e f = Ptr (Tuple6 a b c d e f)Source

type Tuple7Ptr a b c d e f g = Ptr (Tuple7 a b c d e f g)Source

type Tuple8Ptr a b c d e f g h = Ptr (Tuple8 a b c d e f g h)Source

Functor instances so that these new tuple types can

The isomorphic type conversions

Storage instances