[Hat] Hat bug report: Ambiguous occurrence `List'

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Tue Jun 29 08:30:41 EDT 2004


I wrote:

> The following wrapper:
>     foreign import haskell "Prelude.toRational" toRatWord8 :: Word8 -> Rational
> is the culprit.

I've now found a reasonable workaround and checked it into CVS.
Happily, there is no need to attempt to construct a traced Rational
primitively - we can do it in plain Haskell code instead:

    instance Real Word8 where { toRational x = toInteger x % 1 }

Regards,
    Malcolm


More information about the Hat mailing list