Safe Haskell | None |
---|---|
Language | Haskell2010 |
Expr
compilation
Synopsis
- compileExpr :: forall a inp. Expr a -> IndigoState inp (a & inp) ()
- data ObjManipulationRes inp a where
- StillObject :: ObjectExpr a -> ObjManipulationRes inp a
- OnStack :: IndigoState inp (a & inp) () -> ObjManipulationRes inp a
- runObjectManipulation :: ObjectManipulation x -> ObjManipulationRes inp x
- nullaryOp :: KnownValue res => (inp :-> (res ': inp)) -> IndigoState inp (res ': inp) ()
- unaryOp :: KnownValue res => Expr n -> ((n & inp) :-> (res & inp)) -> IndigoState inp (res & inp) ()
- binaryOp :: KnownValue res => Expr n -> Expr m -> ((n & (m & inp)) :-> (res & inp)) -> IndigoState inp (res & inp) ()
- ternaryOp :: KnownValue res => Expr n -> Expr m -> Expr l -> ((n & (m & (l & inp))) :-> (res & inp)) -> IndigoState inp (res & inp) ()
- nullaryOpFlat :: (inp :-> inp) -> IndigoState inp inp ()
- unaryOpFlat :: Expr n -> ((n & inp) :-> inp) -> IndigoState inp inp ()
- binaryOpFlat :: Expr n -> Expr m -> ((n & (m & inp)) :-> inp) -> IndigoState inp inp ()
- ternaryOpFlat :: Expr n -> Expr m -> Expr l -> ((n & (m & (l & inp))) :-> inp) -> IndigoState inp inp ()
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.
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 #