
11 Nov
2003
11 Nov
'03
9:24 a.m.
Hi, I'm playing around with the type system trying to encode various stuff in it. I've gotten an error though which it would be useful to understand. Say I have a type class: class Foo a and then I want a datatype like this: data Bar a = Foo a => C1 | C2 ... | C3 This works fine syntactically but ghc says that I must have at least one existential type variable in the constraint. Hugs doesn't require that but has other problems.... Is there a good reason for not allowing the above? Cheers, /Josef
7862
Age (days ago)
7862
Last active (days ago)
0 comments
1 participants
participants (1)
-
Josef Svenningsson