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,
.
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
"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
| 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?
"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
> > 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
| > 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