GADTs and fundeps

2005-04-06 Thread Bjorn Bringert
GADTs and fundeps don't seem to interact in the way that I (perhaps naively) expect. I expected that for each case, the type variables would be instantiated according to the type of the constructors, and then the fundep would be used to figure out the result type. This does not seem to work,

RE: GADTs and fundeps

2005-04-08 Thread Simon Peyton-Jones
. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:glasgow-haskell-users- | [EMAIL PROTECTED] On Behalf Of Bjorn Bringert | Sent: 06 April 2005 17:22 | To: glasgow-haskell-users@haskell.org | Subject: GADTs and fundeps | | GADTs and fundeps don't seem to interact in the

GADTs and pedagogy was Re: GADTs and fundeps

2005-04-08 Thread Shae Matijs Erisson
"Simon Peyton-Jones" <[EMAIL PROTECTED]> writes: > You are quite right. Indeed GADTs don't interact properly with type > classes at all, let alone functional dependencies, I'm afraid. I > decided to pause and release before attending to this; it's not trivial > to do it right. I haven't trippe

RE: GADTs and pedagogy was Re: GADTs and fundeps

2005-04-08 Thread Simon Peyton-Jones
| I doubt pedagogics was an important part of your goal with GADTs, but now | several people wish that "deriving Show" worked so that GADTs could be used for | everything. You mean, if the data type being defined doesn't actually use the generality of GADTs, allow GADT syntax, and deriving() too?

Re: GADTs and pedagogy was Re: GADTs and fundeps

2005-04-08 Thread Shae Matijs Erisson
"Simon Peyton-Jones" <[EMAIL PROTECTED]> writes: > You mean, if the data type being defined doesn't actually use the > generality of GADTs, allow GADT syntax, and deriving() too? Yes, that would be very nice for the HaskellDemo and new users. I'd definitely switch all of my non-GADT datatypes to

Re: GADTs and pedagogy was Re: GADTs and fundeps

2005-04-08 Thread Abraham Egnor
> > You mean, if the data type being defined doesn't actually use the > > generality of GADTs, allow GADT syntax, and deriving() too? > > Yes, that would be very nice for the HaskellDemo and new users. > I'd definitely switch all of my non-GADT datatypes to use that. One worry I have about this i

RE: GADTs and pedagogy was Re: GADTs and fundeps

2005-07-21 Thread Simon Peyton-Jones
| > You mean, if the data type being defined doesn't actually use the | > generality of GADTs, allow GADT syntax, and deriving() too? | | Yes, that would be very nice for the HaskellDemo and new users. | I'd definitely switch all of my non-GADT datatypes to use that. I finally got around to doing