Introducing type constants
We wish to outlaw terms such as bad_sentence in CFG2EN.hs, even though there may be an interpretation that accepts these bad terms. We really wish our terms represent all and only valid CFG derivations. We accomplish this goal here. Our approach is reminiscent of LCF.
Documentation
Parameterized types: cf notation:
<string,features> in
the Minimalist Grammar
One may think of the above data declaration as defining an isomorphism between EN values and Strings. The functions EN and unEN (what is their type?) witness the isomorphism. It helps to look at their composition.