Extending a datatype in Haskell
问题 Haskell newbie here. I wrote an evaluator for a minimal assembly-like language. Now, I want to extend that language to support some syntactic sugar which, I will then compile back to use only the primitive operators. The ideia is that I do not want to touch the evaluator module again. In the OO way of doing things, I think, one could extend the original module so to support the syntactic sugar operators, providing here the translation rules. Other than that, I can only think of rewriting the