Thanks for reporting this. GHC should instead reject
the program: it doesn't make sense to derive instances
for types with existentially quantified constructors.
I'll commit a fix today, and update the documentation to explain it.
Simon
| -----Original Message-----
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
| Sent: 06 November 1999 16:19
| To: [EMAIL PROTECTED]
| Subject: Deriving instances of existentials
|
|
| The program
|
| data Ex = forall a. Ex [a] deriving Eq
| main = print (Ex "abc" == Ex "abc")
|
| causes ghc-4.04 to die with
|
| Subst.lhs:199: Non-exhaustive patterns in function zip_ty_env
|
| --
| __("< Marcin Kowalczyk * [EMAIL PROTECTED]
| http://qrczak.ids.net.pl/
| \__/ GCS/M d- s+:-- a22 C+++>+++$ UL++>++++$ P+++
| L++>++++$ E-
| ^^ W++ N+++ o? K? w(---) O? M- V? PS-- PE++
| Y? PGP->+ t
| QRCZAK 5? X- R tv-- b+>++ DI D- G+ e>++++ h!
| r--%>++ y-
|
|