[Haskell-cafe] Using Data Types a la Carte
emax at chalmers.se
Fri Apr 20 05:50:58 CEST 2012
2012-04-19 22:31, Alex Rozenshteyn skrev:
> I'm trying to implement a set of languages with a large overlap between them.
> From what I understand, there are 3 main ways to do this: Finally
> Tagless, Data Types a la Carte, or manually.
> I'm currently leaning toward DTalaC, but not strongly.
> There seem to be two packages which implement the DTalaC style:
> syntactic and compdata. Alternatively, I can write the common code
> Does anyone have recommendations for which one to use, and any
> materials for learning to use them?
I can only give useful comments on Syntactic. The core part has been
described in my draft ICFP submission:
For more advanced usage (of defining embedded languages), see
NanoFeldspar, which is included in the Syntactic package.
Syntactic doesn't really support mutually recursive data types, but they
can be encoded using the technique described here:
This seems to be similar to how CompData handles mutually recursive types.
More information about the Haskell-Cafe