props for Hugs over System FC

Anthony Clayden anthony_clayden at
Mon Mar 25 05:45:52 UTC 2019

On Mon, Mar 25, 2019 at 6:24 PM Anthony Clayden <
anthony_clayden at> wrote:

>    ...

Errk. pasted the wrong example. The code that works is

    class F a b | a -> b

    instance F Int Bool

    class D a where { op :: (F a b) => a -> b }

    instance (TypeCast Bool b') => D Int where { op _ = typeCast True }

That dangling `b'` in the constraint is weird. Anyhow: compiles in
Hugs, doesn't in GHC. Unless someone here can persuade it?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Glasgow-haskell-users mailing list