|
|
|
|
|
Description |
Contains the core Gulik evaluator.
|
|
Synopsis |
|
|
|
|
Interp monad actions
|
|
These are useful for building buildins.
|
|
push |
:: Value | Value to push.
| -> Interp () | Resulting Interp monad action.
| Push a value onto the interpreter stack.
|
|
|
pop |
:: Interp Value | Interp monad action containing popped value.
| Pop a value from the interpreter stack.
|
|
|
Evaluation functions
|
|
evalEnv |
:: Env | Initial environment.
| -> [Value] | Initial stack.
| -> [Expr] | Expressions to evaluate.
| -> Either InterpError ([Value], Env) | Error, or resulting (stack, environment) pair.
| Pure functional interface to the interpreter: takes an environment,
an initial stack, and a list of expressions; returns the new stack
and environment, or an error.
|
|
|
eval |
:: Env | Initial environment.
| -> [Value] | Initial stack.
| -> [Expr] | Expressions to evaluate.
| -> Either InterpError [Value] | Error, or resulting stack.
| Version of evalEnv which discards environment.
|
|
|
exec |
:: Env | Initial environment.
| -> [Value] | Initial stack.
| -> [Expr] | Expressions to evaluate.
| -> Either InterpError Env | Error, or resulting environment.
| Version of the above which discards stack.
|
|
|
Produced by Haddock version 0.7 |