[Haskell] class assosiated types, via GADTs.

Keean Schupke k.schupke at imperial.ac.uk
Tue Feb 15 06:21:58 EST 2005


John Meacham wrote:

>
>The main advantage of this translation over the one in the paper is that
>it is not intertwined with the dictionary generation and typeclass
>desugaring code, which is pretty hairy to begin with. Rather it is an
>orthogonal transformation so hopefully will be easier to implement
>without touching too much of ghcs internals.
>
>        John
>
> 
>  
>
Yes, however my worry is that we are heading towards the proliferation 
of not very well thought out overlaping extensions (in the sense that 
how the extensions fit with other proposed and existing extensions does 
not seem well thought out). If the functionality duplicates something 
already achievable using functional dependancies, then what is the point 
of yet another extension to the language. I would rather have a small 
set of powerful tools, than an expansive set of single purpose gadgets.

In my opinion a lot of these things could be implemented as syntactic 
sugar ontop of fundeps (making it easier to read). Template-Haskell 
could be used to generate the required classes from a simplified syntax 
without altering the compiler at all.

    Keean.




More information about the Haskell mailing list