jonsterling/TT-Reflection — pull request #19 by jonsterling (2014-06-20 23:49:32+00:00)
Title: Stateful REPL (WIP)

Fixes #2

So I'm just doing this in a reader monad and then adjusting the context for the next iteration every time something gets defined. Names for declarations are just `_0, _1, _2,..._n`.

I really wanted to get better error handling in here, but I couldn't figure out a clean way to do it. This is one of those cases where honest-to-goodness exceptions have precisely the right semantics for what want, but I wasn't sure how to fit them into the REPL's modality. Any ideas for improvement are much appreciated.