[Haskell-cafe] How to expose if a constraint is satisfiable

Brandon Allbery allbery.b at gmail.com
Mon May 7 18:21:58 UTC 2018

On Mon, May 7, 2018 at 7:50 AM, Clinton Mead <clintonmead at gmail.com> wrote:

> class Num t => MyNum t where
>   type IsNum t
> instance Num t => MyNum t where
>   type IsNum t = Satisfied

This looks wrong to me: given how instance resolution works, I'd expect
this to match every type and produce Satisfied, and later rejection based
on the context wouldn't affect it. But I could well be thinking about it

brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180507/ec086fe3/attachment.html>

More information about the Haskell-Cafe mailing list