CS 453 Recitation — evaluator example in Haskell

This recitation is about learning how to use Data.Map module in Haskell to implement a symbol table that maps variable names to values. In PA4 the values will be symbol table entries that provide information about the symbol's type and if the symbol is a function then about the AVR label for the symbol.

For this recitation, do the following:

  1. Download eval.hs.
  2. Read the comments in eval.hs and step through the usage example.
  3. Create your symbol table and tree and evaluate the tree using that symbol table.
  4. Implement a UnaryMinusNode by editing the evaluate function.
  5. Start reading and trying out the examples in Lessons 1 through 9 at Milewski's Basics of Haskell. They review some of the Haskell concepts you have already used and introduce some new concepts as well. Quiz 3 will be about concepts discussed in these lessons.

mstrout@cs.colostate.edu .... April 1, 2015