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

SevenThunders mattcbro at earthlink.net
Wed Mar 14 01:20:20 EDT 2007

I have the pleasure of porting a good sized Haskell application to linux.
So far the Haskell code has compiled without incident, however some code
that I hacked
to implement a Read instance for Unboxed Arrays does not compile on linux
even though it compiles just fine on Windows XP in Haskell 6.6.

The code reads as,

instance   Read (UArray Int Double)  where
    readsPrec p = readParen (p > 9)
           (\r -> [(array b as :: UArray Int Double, u) | ("array",s) <- lex
                                     (b,t)       <- reads s,
                                     (as,u)      <- reads t   ])

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
View this message in context: http://www.nabble.com/Read-Instance-for-UArray-won%27t-port-to-linux-tf3400261.html#a9468692
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

More information about the Haskell-Cafe mailing list