indigo-0.2.2: Convenient imperative eDSL over Lorentz.
Safe HaskellNone
LanguageHaskell2010

Indigo.Internal.Expr.Compilation

Description

Expr compilation

Synopsis

Documentation

compileExpr :: forall a inp. Expr a -> IndigoState inp (a & inp) () Source #

data ObjManipulationRes inp a where Source #

ObjManipulationRes represents a postponed compilation of ObjectManipulation datatype. When ObjectManipulation is being compiled we are trying to put off the generation of code for work with an object because we can just go to a deeper field without its "materialization" onto stack.

Constructors

StillObject :: ObjectExpr a -> ObjManipulationRes inp a 
OnStack :: IndigoState inp (a & inp) () -> ObjManipulationRes inp a 

runObjectManipulation :: ObjectManipulation x -> ObjManipulationRes inp x Source #

This function might look cumbersome but it basically either goes deeper to an inner field or generates Lorentz code.

nullaryOp :: KnownValue res => (inp :-> (res ': inp)) -> IndigoState inp (res ': inp) () Source #

unaryOp :: KnownValue res => Expr n -> ((n & inp) :-> (res & inp)) -> IndigoState inp (res & inp) () Source #

binaryOp :: KnownValue res => Expr n -> Expr m -> ((n & (m & inp)) :-> (res & inp)) -> IndigoState inp (res & inp) () Source #

ternaryOp :: KnownValue res => Expr n -> Expr m -> Expr l -> ((n & (m & (l & inp))) :-> (res & inp)) -> IndigoState inp (res & inp) () Source #

nullaryOpFlat :: (inp :-> inp) -> IndigoState inp inp () Source #

unaryOpFlat :: Expr n -> ((n & inp) :-> inp) -> IndigoState inp inp () Source #

binaryOpFlat :: Expr n -> Expr m -> ((n & (m & inp)) :-> inp) -> IndigoState inp inp () Source #

ternaryOpFlat :: Expr n -> Expr m -> Expr l -> ((n & (m & (l & inp))) :-> inp) -> IndigoState inp inp () Source #