[Haskell-cafe] Read Instance for UArray won't port to linux

Simon Peyton-Jones simonpj at microsoft.com
Wed Mar 14 05:21:29 EDT 2007


| 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?

Thanks

Simon


More information about the Haskell-Cafe mailing list