Safe Haskell | None |
---|---|
Language | Haskell2010 |
This is an internal relapse module.
It contains relapse grammar parsing helper functions and
it also contains a parser for the JSON serialized relapse AST.
- data ParsedExpr
- = BoolExpr (Expr Bool)
- | DoubleExpr (Expr Double)
- | IntExpr (Expr Int)
- | UintExpr (Expr Uint)
- | StringExpr (Expr String)
- | BytesExpr (Expr Bytes)
- | BoolListExpr [Expr Bool]
- | DoubleListExpr [Expr Double]
- | IntListExpr [Expr Int]
- | UintListExpr [Expr Uint]
- | StringListExpr [Expr String]
- | BytesListExpr [Expr Bytes]
- newBuiltIn :: String -> ParsedExpr -> Either String ParsedExpr
- newFunction :: String -> [ParsedExpr] -> Either String ParsedExpr
- fromJson :: String -> Either String Refs
Documentation
data ParsedExpr Source #
BoolExpr (Expr Bool) | |
DoubleExpr (Expr Double) | |
IntExpr (Expr Int) | |
UintExpr (Expr Uint) | |
StringExpr (Expr String) | |
BytesExpr (Expr Bytes) | |
BoolListExpr [Expr Bool] | |
DoubleListExpr [Expr Double] | |
IntListExpr [Expr Int] | |
UintListExpr [Expr Uint] | |
StringListExpr [Expr String] | |
BytesListExpr [Expr Bytes] |
newBuiltIn :: String -> ParsedExpr -> Either String ParsedExpr Source #
newBuiltIn parsers a builtin function to a relapse expression.
newFunction :: String -> [ParsedExpr] -> Either String ParsedExpr Source #
newFunction parsers a relapse function to a relapse expression.