[Haskell-cafe] How to expose if a constraint is satisfiable
David Feuer
david.feuer at gmail.com
Tue May 8 22:29:20 UTC 2018
Maybe look at https://www.reddit.com/r/haskell/comments/6k86je/constraint_unions_bringing_or_to_the_language_of/
(relating to the repository Oliver links to) and note also Edward
Kmett's response.
On Tue, May 8, 2018 at 9:52 AM, Oliver Charles <ollie at ocharles.org.uk> wrote:
> I've only skimmed the thread, so sorry if this is a red herring, but could
> this be helpful?
> https://github.com/rampion/constraint-unions/blob/master/README.md
>
> 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.
>
>
>
> _______________________________________________
> 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.
More information about the Haskell-Cafe
mailing list