title: Extending a datatype in Haskell
body: <p>Haskell newbie here.  </p>
  
  <p>I wrote an evaluator for a minimal assembly-like language. </p>
  
  <p>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.</p>
  
  <p>In the OO way of doing things, I think, one could <strong>extend</strong> the original module so to support the syntactic sugar operators, providing here the translation rules.</p>
  
  <p>Other than that, I can only think of rewriting the datatype constructors in both modules so that they would not name-collide, and proceed from there, as if they were complete different things, but that implies some redundancy, for I would have to repeat (just with other names) the operators in common.  Again, I think the keyword here is <strong>extend</strong>.</p>
  
  <p>Is there a functional way of accomplishing this? </p>
  
  <p>Thanks for taking the time to read this question.</p>