Re: [Haskell] class assosiated types, via GADTs or FDs

2005-02-17 Thread Keean Schupke
I am working (with ralf oleg) on using template-haskell to introduce syntactic sugar for the kinds of tricks used in the HList and OOHaskell papers, to make these programming styles more user friendly. It might be nice to incorporate CATs as well, although I am not sure what an unlifted CAT

Re: [Haskell] class assosiated types, via GADTs or FDs

2005-02-16 Thread Martin Sulzmann
Hi, you mention three drawbacks FDs have against CATs I believe that all three drawbacks can be addressed. *** Short summary *** (I'm using Manuel's numbering scheme, see his original email below) Drawback #2: FDs introduce clutter True, I think CATs are a great idea but it's also important to

Re: [Haskell] class assosiated types, via GADTs.

2005-02-15 Thread Keean Schupke
Perhaps i'm being dumb, but I dont see the need for either GADTs or class-associated-types to do this... I am pretty sure it can be done using fundeps, using the techniques from the HList paper... of course I haven't coded it yet so there might be some problem I haven't considered. By the way

Re: [Haskell] class assosiated types, via GADTs.

2005-02-15 Thread Keean Schupke
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

Re: [Haskell] class assosiated types, via GADTs or FDs

2005-02-15 Thread Manuel M T Chakravarty
On Tue, 2005-02-15 at 10:16 +, Keean Schupke wrote: Perhaps i'm being dumb, but I dont see the need for either GADTs or class-associated-types to do this... I am pretty sure it can be done using fundeps, Yes, you can encode this example with functional dependencies (see Section 3.4 of

[Haskell] class assosiated types, via GADTs.

2005-02-14 Thread John Meacham
I believe there is a realationship between GADTs and class assosiated types which hints at a much simpler implementation of class assosiated types (CATs) and possibly a lessoning of the constraints mentioned in the paper. Assuming you have already implemented GADTs the translation is