deepakjois / hs-logo

Logo turtle graphics interpreter in Haskell
http://deepakjois.github.io/hs-logo
BSD 3-Clause "New" or "Revised" License
19 stars 3 forks source link

Create types corresponding to evaluation results #3

Open deepakjois opened 12 years ago

deepakjois commented 12 years ago

Currently there are only types corresponding to Logo tokens. We also need a result type that will represent the outcome of evaluating an expression or result.

deepakjois commented 12 years ago

Turns out it was not needed. I decided to overload the LogoToken type to represent the results of an evaluation. Strictly speaking, a valid evaluation can only use a subset of constructors defined by LogoToken. Once I learn to use GADTs better, I might be able to have a more robust type definitions. Till then this should suffice.

Check out changes made in 56b374109