props for Hugs over System FC

Anthony Clayden anthony_clayden at clear.net.nz
Mon Mar 25 05:45:52 UTC 2019


On Mon, Mar 25, 2019 at 6:24 PM Anthony Clayden <
anthony_clayden at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/glasgow-haskell-users/attachments/20190325/e0ee3f0a/attachment.html>


More information about the Glasgow-haskell-users mailing list