Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Changeset [88bddf90f3f22143be928a9d0196cf1891102525] by Douglas Creager

Revision 88bddf90f3f22143be928a9d0196cf1891102525, committed by Douglas Creager · November 6th, 2008 @ 09:30 PM

Helper methods for evaluating CSPM expressions

This patch introduces two helper functions for evaluating CSPM expressions: evaluateWith and evaluate. They wrap together the act of binding an expression, creating an Eval monad instance, and running that instance. evaluateWith allows you to specify which evaluator to use, in case you need to coerce the value that results. In most cases, though, you can use evaluate as follows:

evaluate env expr http://github.com/dcreager/hst/c...

8 changed files

  • M cspm/src/HST/CSPM/Environments.hs
  • M cspm/src/HST/CSPM/Evaluate.hs
  • M cspm/tests/HST/CSPM/Tests/Booleans.hs
  • M cspm/tests/HST/CSPM/Tests/Lambdas.hs
  • M cspm/tests/HST/CSPM/Tests/Lets.hs
  • M cspm/tests/HST/CSPM/Tests/Numbers.hs
  • M cspm/tests/HST/CSPM/Tests/Sequences.hs
  • M cspm/tests/HST/CSPM/Tests/Sets.hs