[Haskell-cafe] Hierachical abstraction
sebf at informatik.uni-kiel.de
Thu Jan 28 18:22:00 EST 2010
On Jan 28, 2010, at 9:31 PM, Luke Palmer wrote:
> I don't remember the name, but there is a technique where you compose
> the features you want and then take its fixed point to get your AST.
Did you think of "Data types à la carte" by Wouter Swierstra?
Also see the comments on Phil Wadler's blog:
> You can make a typeclass for each feature that uses it on any data
> structure in which it is present.
I don't fully understand this sentence but it reminds me of "Finally
Tagless, Partially Evaluated" by Jacques Carette, Oleg Kiselyov and
Regarding the question of representing in the type system which
features are used, phantom types might also be helpful. If I remember
correctly, they were introduced by Daan Leijen and Erik Meijer to
restrict a data type that represents syntactically
correct database queries such that only type correct queries can be
Underestimating the novelty of the future is a time-honored tradition.
More information about the Haskell-Cafe