diff --git a/src/CEKEvaluator.hs b/src/CEKEvaluator.hs index 50bb5fda..2d484f7a 100644 --- a/src/CEKEvaluator.hs +++ b/src/CEKEvaluator.hs @@ -10,6 +10,22 @@ {- Note [The CEK interpreter]: +The Klister interpreter is a straightforward implementation of a CEK +interpreter. The interpreter keeps three kinds of state: + +-- C: Control ::= The thing that is being evaluated +-- E: Environment ::= The interpreter environment +-- K: Kontinuation ::= The syntactic context of the thing that is being interpreted + +Why a CEK? A CEK interpreter allows us to have precise control over the +evaluation of a klister program. For example, because the interpreter keeps a +reference to the kontinuation we can provide stack traces. This handle also +makes a more advanced debugger possible. Upon an evaluation error we could save +the kontinuation stack, over write a variable in the environment a la common +lisp or even rewind the evaluation + +The bird's eye view: + -} module CEKEvaluator