
Simon Peyton-Jones wrote:
| The error in linux is: | Illegal instance declaration for `Read (UArray Int Double)' | (The instance type must be of form (T a b c) | where T is not a synonym, and a,b,c are distinct type variables) | In the instance declaration for `Read (UArray Int Double)' | | Why does it want three parameters for the instance type? I am baffled by | this.
It's saying that in Haskell 98 you can have instance Read (UArray a b) (for type variables a, b) but not instance Read (UArray Int Double)
(As Spencer says, use -fglasgow-exts to lift the H98 restriction.)
However, you mis-read the error message to say "the instance type must have three parameters", which isn't what I meant at all! I was trying to use an example of the general form, but conveyed the wrong idea.
I can see why you read it that way. Now you understand, can you give me a better error message?
I'm not the original poster, but what about just changing it to "The instance type must be of the form (T a1 ... an) where T is not a synonym, and a1 ... an are distinct type variables)"? /Björn