fwgl-0.1.0.2: FRP 2D/3D game engine

Safe HaskellSafe-Inferred
LanguageHaskell2010

FWGL.Shader.Monad

Documentation

data Shader g i o a where Source

Constructors

Pure :: a -> Shader g i o a 
Bind :: Shader g' i' o' b -> (b -> Shader g'' i'' o'' a) -> Shader g i o a 
Get :: (Member a i, Typeable a, ShaderType a) => Shader g i o a 
Global :: (Member a g, Typeable a, ShaderType a) => Shader g i o a 
Put :: (Member a o, Typeable a, ShaderType a) => a -> Shader g i o () 

type PartialShader g i o a = (Subset o o', Subset g g', Subset i i', Subset i' i) => Shader g' i' o' a Source

type Member x xs = Subset `[x]` xs Source

class AllTypeable xs Source

Instances

AllTypeable ([] *) 
(Typeable * x, AllTypeable xs) => AllTypeable ((:) * x xs) 

class Subset xs ys Source

Instances

Subset ([] *) ys 
(Subset ((:) * x ([] *)) ys, Subset xs ys) => Subset ((:) * x xs) ys 

type Equal xs ys = (Subset xs ys, Subset ys xs) Source

type family Union xs ys Source

Equations

Union [] ys = ys 
Union (x : xs) ys = Union xs (Insert x ys) 

type family Insert y xs Source

Equations

Insert y [] = `[y]` 
Insert y (y : xs) = y : xs 
Insert y (x : xs) = x : Insert y xs 

return :: a -> Shader g i o a Source

get :: (Member a i, Typeable a, ShaderType a) => Shader g i o a Source

global :: (Member a g, Typeable a, ShaderType a) => Shader g i o a Source

put :: (Member a o, Typeable a, ShaderType a) => a -> Shader g i o () Source

(>>) :: Shader g i o a -> Shader g i o b -> Shader g i o b Source

(>>=) :: Shader g i o a -> (a -> Shader g i o b) -> Shader g i o b Source

fail :: String -> Shader g i o a Source