Skip to content

Commit

Permalink
wrk: more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
doyougnu committed Jan 14, 2024
1 parent d39e95b commit fa83318
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/CEKEvaluator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa83318

Please sign in to comment.