RE: Overlapping and incoherent instances

On Tue, 29 Jul 2014 16:29:45 +0000, Simon Peyton Jones
CAN_OVERLAP and CAN_BE_OVERLAPPED?
(instead of OVERLAPPING and OVERLAPPABLE)
Or CAN-OVERLAP, CAN-BE-OVERLAPPED
That’s ok with me if that’s what you all want!
Simon
For my 2¢, I think OVERLAPPING and OVERLAPPABLE are just fine - I immediately understood what each word meant, there's no ugly ‘_’ or ‘-’ to agonize about for eternity. I would be +1 on just keeping those names as-is. I'm neutral about whether or not I like OVERLAPS as a combination of both, I don't think that communicates quite clearly what's going on - but I do think it's important to have a way to not have to write both lengthy pragmas out.

Simon Peyton Jones Tue Jul 29 09:11:05 UTC 2014 ... This is a Big Hammer.
I agree with Simon's motivation that the whole-module overlap pragma is often too brutal. But I think that what Iavor has developed is still too brutal. (Sorry, and I hadn't known about these instance-level pragmas before now.) For my 2d, I think Andreas made an important distinction:
Andreas Abel andreas.abel at ifi.lmu.de Wed Jul 30 12:07:01 UTC 2014 The German equivalent of "overlap", ..., is used exclusively in a symmetrical fashion. It's like in English, if I say "our interests overlap", then it is pointless to ask whether my interest are overlapping yours or are overlapped by yours.
I'd say that the English "overlap" is also used in a symmetrical fashion (outside of specialist Haskell instances usage). There's a difference between: - this instance is nec. narrower than some other instance (IOW anything that's a substitution for this instance, is ipso facto a substitution for some wider) - vs. a partial overlap (some substitutions will fit this instance only, some will fit another instance, not this one, some will fit both) In my experience, unintended partial overlaps are the nastiest to diagnose. And partial overlaps are very seldom needed in practice. They're often a symptom that two separately-developed libraries are clashing. (For example the HList libraries -- as originally released -- used overlap extensively, but no partial overlaps.) So I would like the pragmas to be able to say: this instance subsumes or is subsumed by some other instance but it must not partially overlap any instance. (I guess this is beyond the question Simon's OP asked.) AntC
participants (2)
-
AntC
-
Niklas Haas