Copyright | (c) Kimiyuki Onaka 2020 |
---|---|
License | Apache License 2.0 |
Maintainer | kimiyuki95@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Evaluate
evaluates exprs to values. Also this recognizes users' inputs at once.
The implementation assumes that all variable names don't conflict even when their scopes are distinct.
Synopsis
- run :: (MonadAlpha m, MonadFix m, MonadError Error m) => Program -> [Value] -> m Value
- callProgram :: (MonadFix m, MonadError Error m) => Program -> [Value] -> m Value
- data Value
Documentation
run :: (MonadAlpha m, MonadFix m, MonadError Error m) => Program -> [Value] -> m Value Source #
callProgram :: (MonadFix m, MonadError Error m) => Program -> [Value] -> m Value Source #
callProgram
evaluates programs with given arguments.
This function assumes that given programs are ready for eager evaluation (ensureEagerlyEvaluatable
).