lambdacube-edsl-0.2.0: LambdaCube 3D EDSL definition

Safe HaskellNone
LanguageHaskell2010

LambdaCube.Language.Type

Documentation

data NatNum :: Nat -> * where Source

Constructors

N0 :: NatNum 0 
N1 :: NatNum 1 
N2 :: NatNum 2 
N3 :: NatNum 3 
N4 :: NatNum 4 
N5 :: NatNum 5 
N6 :: NatNum 6 
N7 :: NatNum 7 
N8 :: NatNum 8 
N9 :: NatNum 9 

Instances

class InputTuple tup where Source

Associated Types

type InputTupleRepr tup Source

Methods

toInputList :: tup -> [(ByteString, InputType)] Source

Instances

data Input a where Source

Instances

InputTuple (Input a) 
InputTuple (Input a, Input b) 
InputTuple (Input a, Input b, Input c) 
InputTuple (Input a, Input b, Input c, Input d) 
InputTuple (Input a, Input b, Input c, Input d, Input e) 
InputTuple (Input a, Input b, Input c, Input d, Input e, Input f) 
InputTuple (Input a, Input b, Input c, Input d, Input e, Input f, Input g) 
InputTuple (Input a, Input b, Input c, Input d, Input e, Input f, Input g, Input h) 
InputTuple (Input a, Input b, Input c, Input d, Input e, Input f, Input g, Input h, Input i) 
type InputTupleRepr (Input a) = a 
type InputTupleRepr (Input a, Input b) = (a, b) 
type InputTupleRepr (Input a, Input b, Input c) = (a, b, c) 
type InputTupleRepr (Input a, Input b, Input c, Input d) = (a, b, c, d) 
type InputTupleRepr (Input a, Input b, Input c, Input d, Input e) = (a, b, c, d, e) 
type InputTupleRepr (Input a, Input b, Input c, Input d, Input e, Input f) = (a, b, c, d, e, f) 
type InputTupleRepr (Input a, Input b, Input c, Input d, Input e, Input f, Input g) = (a, b, c, d, e, f, g) 
type InputTupleRepr (Input a, Input b, Input c, Input d, Input e, Input f, Input g, Input h) = (a, b, c, d, e, f, g, h) 
type InputTupleRepr (Input a, Input b, Input c, Input d, Input e, Input f, Input g, Input h, Input i) = (a, b, c, d, e, f, g, h, i) 

data VertexStream primitive t Source

data PrimitiveStream primitive clipDistances layerCount freq t Source

data FragmentStream layerCount t Source

data ZZ Source

Constructors

ZZ 

Instances

Show ZZ 
Typeable * ZZ 
IsColorOutput * ZZ 
IsFloatTuple * ZZ 
type NoStencilRepr ZZ = ZZ 
type ColorRepr ZZ = ZZ 
type FTRepr ZZ = () 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ((:+:) (i5 e) ((:+:) (i6 f) ((:+:) (i7 g) ((:+:) (i8 h) ((:+:) (i9 i) ZZ))))))))) = (a, b, c, d, e, f, g, h, i) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ((:+:) (i5 e) ((:+:) (i6 f) ((:+:) (i7 g) ((:+:) (i8 h) ZZ)))))))) = (a, b, c, d, e, f, g, h) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ((:+:) (i5 e) ((:+:) (i6 f) ((:+:) (i7 g) ZZ))))))) = (a, b, c, d, e, f, g) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ((:+:) (i5 e) ((:+:) (i6 f) ZZ)))))) = (a, b, c, d, e, f) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ((:+:) (i5 e) ZZ))))) = (a, b, c, d, e) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ZZ)))) = (a, b, c, d) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ZZ))) = (a, b, c) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ZZ)) = (a, b) 
type FTRepr' ((:+:) (i1 a) ZZ) = a 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ((:+:) e ((:+:) f ((:+:) g ((:+:) h ((:+:) i ZZ))))))))) = (a, b, c, d, e, f, g, h, i) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ((:+:) e ((:+:) f ((:+:) g ((:+:) h ZZ)))))))) = (a, b, c, d, e, f, g, h) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ((:+:) e ((:+:) f ((:+:) g ZZ))))))) = (a, b, c, d, e, f, g) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ((:+:) e ((:+:) f ZZ)))))) = (a, b, c, d, e, f) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ((:+:) e ZZ))))) = (a, b, c, d, e) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ZZ)))) = (a, b, c, d) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ZZ))) = (a, b, c) 
type FTRepr ((:+:) a ((:+:) b ZZ)) = (a, b) 
type FTRepr ((:+:) a ZZ) = a 

data tail :+: head infixr 1 Source

Constructors

!tail :+: !head infixr 1 

Instances

IsColorOutput * a => IsValidOutput * ((:+:) (Stencil k s) ((:+:) (Depth k d) a)) 
IsColorOutput * a => IsValidOutput * ((:+:) (Stencil k s) a) 
IsColorOutput * a => IsValidOutput * ((:+:) (Depth k d) a) 
IsColorOutput * a => IsValidOutput * ((:+:) (Color k c) a) 
IsColorOutput * b => IsColorOutput * ((:+:) (Color k c) b) 
IsFloatTuple * l => IsFloatTuple * ((:+:) Float l) 
(Show tail, Show head) => Show ((:+:) tail head) 
Typeable (* -> * -> *) (:+:) 
type NoStencilRepr ((:+:) (Stencil k a) b) = NoStencilRepr b 
type NoStencilRepr ((:+:) (Depth k a) b) = (:+:) (Depth k a) (NoStencilRepr b) 
type NoStencilRepr ((:+:) (Color k a) b) = (:+:) (Color k a) (NoStencilRepr b) 
type ColorRepr ((:+:) a b) = (:+:) (Color * a) (ColorRepr b) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ((:+:) (i5 e) ((:+:) (i6 f) ((:+:) (i7 g) ((:+:) (i8 h) ((:+:) (i9 i) ZZ))))))))) = (a, b, c, d, e, f, g, h, i) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ((:+:) (i5 e) ((:+:) (i6 f) ((:+:) (i7 g) ((:+:) (i8 h) ZZ)))))))) = (a, b, c, d, e, f, g, h) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ((:+:) (i5 e) ((:+:) (i6 f) ((:+:) (i7 g) ZZ))))))) = (a, b, c, d, e, f, g) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ((:+:) (i5 e) ((:+:) (i6 f) ZZ)))))) = (a, b, c, d, e, f) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ((:+:) (i5 e) ZZ))))) = (a, b, c, d, e) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ZZ)))) = (a, b, c, d) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ZZ))) = (a, b, c) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ZZ)) = (a, b) 
type FTRepr' ((:+:) (i1 a) ZZ) = a 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ((:+:) e ((:+:) f ((:+:) g ((:+:) h ((:+:) i ZZ))))))))) = (a, b, c, d, e, f, g, h, i) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ((:+:) e ((:+:) f ((:+:) g ((:+:) h ZZ)))))))) = (a, b, c, d, e, f, g, h) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ((:+:) e ((:+:) f ((:+:) g ZZ))))))) = (a, b, c, d, e, f, g) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ((:+:) e ((:+:) f ZZ)))))) = (a, b, c, d, e, f) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ((:+:) e ZZ))))) = (a, b, c, d, e) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ZZ)))) = (a, b, c, d) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ZZ))) = (a, b, c) 
type FTRepr ((:+:) a ((:+:) b ZZ)) = (a, b) 
type FTRepr ((:+:) a ZZ) = a 

data FlatTuple c a t where Source

Constructors

ZT :: FlatTuple c a ZZ 
(:.) :: c t => a t -> FlatTuple c a t' -> FlatTuple c a (t :+: t') infixr 1 

data Interpolated e a where Source

Constructors

Flat :: e a -> Interpolated e a 
Smooth :: IsFloating a => e a -> Interpolated e a 
NoPerspective :: IsFloating a => e a -> Interpolated e a 

Instances

Typeable ((k -> *) -> k -> *) (Interpolated k) 

data Color a Source

Instances

IsColorOutput * a => IsValidOutput * ((:+:) (Color k c) a) 
IsColorOutput * b => IsColorOutput * ((:+:) (Color k c) b) 
Typeable (k -> *) (Color k) 
type NoStencilRepr ((:+:) (Color k a) b) = (:+:) (Color k a) (NoStencilRepr b) 

data Depth a Source

Instances

IsColorOutput * a => IsValidOutput * ((:+:) (Stencil k s) ((:+:) (Depth k d) a)) 
IsColorOutput * a => IsValidOutput * ((:+:) (Depth k d) a) 
Typeable (k -> *) (Depth k) 
type NoStencilRepr ((:+:) (Depth k a) b) = (:+:) (Depth k a) (NoStencilRepr b) 

data Stencil a Source

Instances

IsColorOutput * a => IsValidOutput * ((:+:) (Stencil k s) ((:+:) (Depth k d) a)) 
IsColorOutput * a => IsValidOutput * ((:+:) (Stencil k s) a) 
Typeable (k -> *) (Stencil k) 
type NoStencilRepr ((:+:) (Stencil k a) b) = NoStencilRepr b 

type family PrimitiveVertices primitive a Source

Instances

type PrimitiveVertices LineAdjacency a = (a, a, a, a) 
type PrimitiveVertices TriangleAdjacency a = (a, a, a, a, a, a) 
type PrimitiveVertices Point a = a 
type PrimitiveVertices Line a = (a, a) 
type PrimitiveVertices Triangle a = (a, a, a) 

class NoConstraint a Source

Instances

type FrameBuffer layerCount t = FlatTuple NoConstraint (Image layerCount) t Source

data Image layerCount t where Source

Constructors

DepthImage :: KnownNat layerCount => NatNum layerCount -> Float -> Image layerCount (Depth Float) 
StencilImage :: KnownNat layerCount => NatNum layerCount -> Int32 -> Image layerCount (Stencil Int32) 
ColorImage :: (IsNum t, IsVecScalar d color t, IsScalar color, KnownNat layerCount) => NatNum layerCount -> color -> Image layerCount (Color color) 
UnclearedImage :: (IsNum t, IsVecScalar d color t, IsScalar color, KnownNat layerCount) => NatNum layerCount -> Image layerCount (Color color) 

Instances

Typeable (Nat -> * -> *) Image 

class IsColorOutput a Source

Instances

class IsValidOutput a Source

Instances

IsColorOutput * a => IsValidOutput * ((:+:) (Stencil k s) ((:+:) (Depth k d) a)) 
IsColorOutput * a => IsValidOutput * ((:+:) (Stencil k s) a) 
IsColorOutput * a => IsValidOutput * ((:+:) (Depth k d) a) 
IsColorOutput * a => IsValidOutput * ((:+:) (Color k c) a) 

type family FTRepr a :: * Source

Instances

type FTRepr ZZ = () 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ((:+:) e ((:+:) f ((:+:) g ((:+:) h ((:+:) i ZZ))))))))) = (a, b, c, d, e, f, g, h, i) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ((:+:) e ((:+:) f ((:+:) g ((:+:) h ZZ)))))))) = (a, b, c, d, e, f, g, h) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ((:+:) e ((:+:) f ((:+:) g ZZ))))))) = (a, b, c, d, e, f, g) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ((:+:) e ((:+:) f ZZ)))))) = (a, b, c, d, e, f) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ((:+:) e ZZ))))) = (a, b, c, d, e) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ((:+:) d ZZ)))) = (a, b, c, d) 
type FTRepr ((:+:) a ((:+:) b ((:+:) c ZZ))) = (a, b, c) 
type FTRepr ((:+:) a ((:+:) b ZZ)) = (a, b) 
type FTRepr ((:+:) a ZZ) = a 

type family FTRepr' a :: * Source

Instances

type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ((:+:) (i5 e) ((:+:) (i6 f) ((:+:) (i7 g) ((:+:) (i8 h) ((:+:) (i9 i) ZZ))))))))) = (a, b, c, d, e, f, g, h, i) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ((:+:) (i5 e) ((:+:) (i6 f) ((:+:) (i7 g) ((:+:) (i8 h) ZZ)))))))) = (a, b, c, d, e, f, g, h) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ((:+:) (i5 e) ((:+:) (i6 f) ((:+:) (i7 g) ZZ))))))) = (a, b, c, d, e, f, g) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ((:+:) (i5 e) ((:+:) (i6 f) ZZ)))))) = (a, b, c, d, e, f) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ((:+:) (i5 e) ZZ))))) = (a, b, c, d, e) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ((:+:) (i4 d) ZZ)))) = (a, b, c, d) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ((:+:) (i3 c) ZZ))) = (a, b, c) 
type FTRepr' ((:+:) (i1 a) ((:+:) (i2 b) ZZ)) = (a, b) 
type FTRepr' ((:+:) (i1 a) ZZ) = a 

type family ColorRepr a :: * Source

Instances

type ColorRepr ZZ = ZZ 
type ColorRepr ((:+:) a b) = (:+:) (Color * a) (ColorRepr b) 

type family NoStencilRepr a :: * Source

Instances

type NoStencilRepr ZZ = ZZ 
type NoStencilRepr ((:+:) (Stencil k a) b) = NoStencilRepr b 
type NoStencilRepr ((:+:) (Depth k a) b) = (:+:) (Depth k a) (NoStencilRepr b) 
type NoStencilRepr ((:+:) (Color k a) b) = (:+:) (Color k a) (NoStencilRepr b) 

data MipMap t where Source

Constructors

NoMip :: MipMap TexNoMip 
Mip :: Int -> Int -> MipMap TexMip 
AutoMip :: Int -> Int -> MipMap TexMip 

Instances

type family TexDataRepr arity t Source

Instances

type TexDataRepr RGBA (v a) = V4 a 
type TexDataRepr RGB (v a) = V3 a 
type TexDataRepr RG (v a) = V2 a 
type TexDataRepr Red (v a) = a 

type family TexArrRepr a :: TextureArray Source

Instances

data TextureType :: TextureShape -> TextureMipMap -> TextureArray -> Nat -> TextureSemantics * -> * -> * where Source

Constructors

Texture1D :: KnownNat layerCount => TextureDataType t ar -> NatNum layerCount -> TextureType Tex1D TexMip (TexArrRepr layerCount) layerCount t ar 
Texture2D :: KnownNat layerCount => TextureDataType t ar -> NatNum layerCount -> TextureType Tex2D TexMip (TexArrRepr layerCount) layerCount t ar 
Texture3D :: TextureDataType (Regular t) ar -> TextureType Tex3D TexMip SingleTex 1 (Regular t) ar 
TextureCube :: TextureDataType t ar -> TextureType Tex2D TexMip CubeTex 6 t ar 
TextureRect :: TextureDataType t ar -> TextureType TexRect TexNoMip SingleTex 1 t ar 
Texture2DMS :: KnownNat layerCount => TextureDataType (Regular t) ar -> NatNum layerCount -> TextureType Tex2D TexNoMip (TexArrRepr layerCount) layerCount (MultiSample t) ar 
TextureBuffer :: TextureDataType (Regular t) ar -> TextureType Tex1D TexNoMip SingleTex 1 (Buffer t) ar 

data Texture dim arr t ar Source

Instances

type family TexSizeRepr a Source

class IsVec dim vec component | vec -> dim component, dim component -> vec Source

Instances

IsVec * * 2 (V2 Bool) Bool 
IsVec * * 2 (V2 Float) Float 
IsVec * * 2 (V2 Int32) Int32 
IsVec * * 2 (V2 Word32) Word32 
IsVec * * 3 (V3 Bool) Bool 
IsVec * * 3 (V3 Float) Float 
IsVec * * 3 (V3 Int32) Int32 
IsVec * * 3 (V3 Word32) Word32 
IsVec * * 4 (V4 Bool) Bool 
IsVec * * 4 (V4 Float) Float 
IsVec * * 4 (V4 Int32) Int32 
IsVec * * 4 (V4 Word32) Word32 

class IsVecScalar dim vec component | vec -> dim component, dim component -> vec Source

class IsMat mat h w | mat -> h w Source

Instances

IsMat * * * M22F V2F V2F 
IsMat * * * M23F V2F V3F 
IsMat * * * M24F V2F V4F 
IsMat * * * M32F V3F V2F 
IsMat * * * M33F V3F V3F 
IsMat * * * M34F V3F V4F 
IsMat * * * M42F V4F V2F 
IsMat * * * M43F V4F V3F 
IsMat * * * M44F V4F V4F 

class IsSigned a Source

Instances

class Real a => IsNum a Source