Re: Hat bug report: Ambiguous occurrence `List'

Malcolm Wallace <[email protected]> Tue, 29 Jun 2004 13:30:41 +0100
Newsgroups gmane.comp.lang.haskell.hat
Organization Dept of Computer Science, University of York
Message-ID <[email protected]>
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