ixshader-0.0.1.0: A shallow embedding of the OpenGL Shading Language in Haskell.

Safe HaskellNone
LanguageHaskell2010

Graphics.IxShader.IxShader

Synopsis

Documentation

data IxShader ctx i j n Source #

Instances

IxFunctor [*] [*] (IxShader k ctx) Source # 

Methods

imap :: (a -> b) -> f j k2 a -> f j k2 b #

IxMonad [*] (IxShader k ctx) Source # 

Methods

ibind :: (a -> m j k1 b) -> m i j a -> m i k1 b #

IxApplicative [*] (IxShader k ctx) Source # 

Methods

iap :: m i j (a -> b) -> m j k1 a -> m i k1 b #

IxPointed [*] (IxShader k ctx) Source # 

Methods

ireturn :: a -> m i i a #

unDecl :: IxShader ctx i j n -> [String] Source #

unN :: IxShader ctx i j n -> n Source #

(>>=) :: forall i j k a b ctx. IxShader ctx i j a -> (a -> IxShader ctx j k b) -> IxShader ctx i k b Source #

(>>) :: forall i j a k b ctx. IxShader ctx i j a -> IxShader ctx j k b -> IxShader ctx i k b Source #

return :: forall a i ctx. a -> IxShader ctx i i a Source #

fail :: forall i j a ctx. String -> IxShader ctx i j a Source #

void :: IxShader ctx i k a -> IxShader ctx i k () Source #

acc :: forall typ a i ctx. String -> typ -> a -> IxShader ctx i (i :++ '[typ]) a Source #

Does three things - appends a type to the IxMonad j, encodes one or more lines of shader code and returns something. This is the main entry point for any shader building code, and also an easy escape hatch.

nxt :: forall i a ctx. String -> a -> IxShader ctx i i a Source #

nxt_ :: forall i ctx. String -> IxShader ctx i i () Source #

sub :: forall i j a ctx. String -> String -> IxShader ctx i j a -> IxShader ctx i j a Source #

sub_ :: forall i j a ctx. String -> String -> IxShader ctx i j a -> IxShader ctx i j () Source #

pop :: IxShader ctx (t ': j) j () Source #

putSrcLn :: forall ctx j a. IxShader ctx '[] j a -> IO () Source #

onlySrc :: IxShader ctx i j a -> String Source #

toSrc :: Pretty a => a -> String Source #