Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- eval :: SymbolTable -> Expression a -> ExpVal
- eval' :: SymbolTable -> Expression a -> Either String ExpVal
- evalWithShortcircuit :: SymbolTable -> Expression a -> Either String ExpVal
Documentation
eval :: SymbolTable -> Expression a -> ExpVal Source #
Given a SymbolTable
and some Expression
, evaluate that expression
into a basic type and return it as an ExpVal
eval' :: SymbolTable -> Expression a -> Either String ExpVal Source #
Given a SymbolTable
and some Expression
, evaluate that expression
into a basic type and return it as an ExpVal
or a String
describing
the issue that prevented the evaluation
evalWithShortcircuit :: SymbolTable -> Expression a -> Either String ExpVal Source #
Given a SymbolTable
and some Expression
, evaluate that expression
into a basic type and return it as an ExpVal
or a String
describing
the issue that prevented the evaluation. In the case of expressions like
foobar .AND. .FALSE. .TRUE. .OR. .foobar
the expressions will be shortcircuited to produce
.FALSE. .TRUE.