[Haskell-cafe] Re: problem with collection (container) class

Simon Peyton-Jones simonpj at microsoft.com
Mon Feb 18 03:48:35 EST 2008


Good point. Happily I improved the error message a couple of weeks ago, so it'll be better in the next release

Simon

| -----Original Message-----
| From: haskell-cafe-bounces at haskell.org [mailto:haskell-cafe-bounces at haskell.org] On Behalf Of Daniel Fischer
| Sent: 08 February 2008 22:24
| To: Ben Franksen; haskell-cafe at haskell.org
| Subject: Re: [Haskell-cafe] Re: problem with collection (container) class
|
| Am Freitag, 8. Februar 2008 22:14 schrieb Ben Franksen:
| > If it's a bug then it is probably in 6.6.1 too, it just gets hidden by the
| > fact that in 6.6.1 the -fglasgow-exts extensions cannot be activated
| > separately. If you enable one of them, you get them all.
| >
| Thanks for the info, didn't know that.
|
| The problem was the error message, which didn't mention that each type
| variable may appear only once in an instance head, which I had temporarily
| forgotten. Then the message
|
| Leandro.hs:32:0:
|     Illegal instance declaration for `Container (Abb a b) a b'
|         (All instance types must be of the form (T a1 ... an)
|          where a1 ... an are distinct type *variables*
|          Use -XFlexibleInstances if you want to disable this.)
|     In the instance declaration for `Container (Abb a b) a b'
|
| looks rather confusing :)
|
| > Cheers
| > Ben
| >
| Cheers,
| Daniel
| _______________________________________________
| Haskell-Cafe mailing list
| Haskell-Cafe at haskell.org
| http://www.haskell.org/mailman/listinfo/haskell-cafe


More information about the Haskell-Cafe mailing list