showell / meta-elm / MeRunTime

The MetaElm RunTime (MeRunTime) can evaluate AST expressions inside Elm!

main API

computeExpr : MeType.Expr -> MeType.Expr

compute/evaluate an expression

compute : MeType.Context -> MeType.Expr -> MeType.Expr

like computeExpr, but you can pass in a context

getFinalValue : MeType.Expr -> MeType.V

get the value of a computed expression (usually after a call to compute)

helpers

Helpers are mostly used for wrapping library functions like List.map.

getFuncV : MeType.Context -> MeType.Expr -> MeType.FV

kinda gets a one-argument function from an expression

getFuncVV : MeType.Context -> MeType.Expr -> MeType.FVV

kinda gets a two-argument function from an expression

getFuncVVV : MeType.Context -> MeType.Expr -> MeType.FVVV

kinda gets a three-argument function from an expression

getFuncVVVV : MeType.Context -> MeType.Expr -> MeType.FVVVV

kinda gets a four-argument function from an expression

getFuncVVVVV : MeType.Context -> MeType.Expr -> MeType.FVVVVV

kinda gets a five-argument function from an expression

getValue : MeType.Context -> MeType.Expr -> MeType.V

convert expression to value (or error if it's a function

error : String -> MeType.Expr

value representing error in computation