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

Oliver Charles ollie at ocharles.org.uk
Tue May 8 13:52:03 UTC 2018

I've only skimmed the thread, so sorry if this is a red herring, but could
this be helpful?

On Tue, May 8, 2018 at 12:49 PM, Li-yao Xia <lysxia at gmail.com> wrote:

> On 05/07/2018 11:45 PM, Clinton Mead wrote:
>> Hi Li-yao
>> I understand this issue, but I think what your describing doesn't relate
>> to what I'm talking about uniquely.
>> For example:
>> instance {-# OVERLAPPABLE #-} Num x => C x where ...
>> instance {-# OVERLAPPING #-} C Int where ...
>> is completely legal, and the instance used depends on context.
>> This is an issue with overlapping instances, but already GHC allows it. I
>> don't think what I'm proposing is any worse to what's already legal.
>> No instance for the C type class above will be picked until x is equal to
> some applied type constructor; it will be more challenging to break
> coherence with that than using what you're proposing.
> It seems difficult to make a clear point because the whole topic of
> coherence with Haskell type classes is already a minefield.
> Li-yao
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180508/67a96b86/attachment.html>

More information about the Haskell-Cafe mailing list