[Haskell-cafe] How to expose if a constraint is satisfiable
kane at kane.cx
Mon May 7 18:29:24 UTC 2018
Correct. That instance won't work as expected.
On 5/7/2018 8:21 PM, Brandon Allbery wrote:
> On Mon, May 7, 2018 at 7:50 AM, Clinton Mead <clintonmead at gmail.com
> <mailto: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 incorrectly.
> brandon s allbery kf8nh sine nomine associates
> allbery.b at gmail.com <mailto:allbery.b at gmail.com>
> ballbery at sinenomine.net <mailto:ballbery at sinenomine.net>
> unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe