On Mon, Mar 25, 2019 at 6:24 PM Anthony Clayden <
anthony_clay...@clear.net.nz> 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?


AntC
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users

Reply via email to