Safe Haskell | None |
---|---|
Language | Haskell2010 |
Decompose a complex value into its fields
to be used in setVar
.
Also functionality to generate code to deconstruct storage
into primitive fields the storage consists of
and to construct it back.
Synopsis
- decomposeExpr :: ComplexObjectC a => Expr a -> ExprDecomposition inp a
- deepDecomposeCompose :: forall a inp. IsObject a => SomeIndigoState (a & inp) (Var a)
- data ExprDecomposition inp a where
- ExprFields :: Rec Expr (FieldTypes a) -> ExprDecomposition inp a
- Deconstructed :: IndigoState inp (FieldTypes a ++ inp) () -> ExprDecomposition inp a
- class IsObject' (TypeDecision a) a => IsObject a
Documentation
decomposeExpr :: ComplexObjectC a => Expr a -> ExprDecomposition inp a Source #
Decompose an expression to list of its direct fields.
deepDecomposeCompose :: forall a inp. IsObject a => SomeIndigoState (a & inp) (Var a) Source #
For given element on stack, generate code which
decomposes it to list of its deep non-decomposable fields.
Clean up code of SomeIndigoState
composes the value back.
data ExprDecomposition inp a where Source #
Datatype representing decomposition of Expr
.
ExprFields :: Rec Expr (FieldTypes a) -> ExprDecomposition inp a | |
Deconstructed :: IndigoState inp (FieldTypes a ++ inp) () -> ExprDecomposition inp a |