[Haskell] I try to thaw an array of unboxed arrays to the IO monad

Simon Peyton-Jones simonpj at microsoft.com
Thu Jan 6 04:41:32 EST 2005


| The error above is telling you that there's no instance for 'MArray b
| FlatVector IO' - this is because you haven't specified the array type
| 'b' into which thaw should convert the array.  The error message is a
| bit misleading; it's really an ambiguity rather than a missing
instance
| (I don't know whether it could be reasonably improved, though).

That is indeed horrible.  Duly improved.

Foo.hs:16:7:
    Ambiguous type variable `b' in the constraint:
      `MArray b FlatVector IO' arising from use of `thaw' at
Foo.hs:16:7-10
    Probable fix: add a type signature that fixes these type variable(s)


Simon


More information about the Haskell mailing list