Overlapping and incoherent instances
Iavor Diatchki
iavor.diatchki at gmail.com
Tue Jul 29 17:28:56 UTC 2014
Hello,
I have no strong feelings about what words we use, but I wanted to point
out that while we are thinking of names, we may want to consider 3 (and not
just 2). Currently we have:
* OVERLAPPING: This instances may overlap existing instances
* OVERLAPPABLE: This instance may be overlapped by existing instances
* OVERLAPS: This instance is both OVERLAPPING and OVERLAPPABLE
Of course, the 3rd one (OVERLAPS) could be replaced by a comma separated
list of the first two, but I could not see how to make this work easily
with GHC's pragmas. It would not be hard to simply allow 2 pragmas after
the `instance` keyword, but both of those seem rather long.
Either way, I'll keep an eye on the discussion, and would be happy to
change the names if a consesus is reached.
-Iavor
On Tue, Jul 29, 2014 at 9:57 AM, David Thomas <davidleothomas at gmail.com>
wrote:
> Honestly, I think "OVERLAPS" and "OVERLAPPED" are perfectly clear.
>
> On Tue, Jul 29, 2014 at 9:52 AM, David Feuer <david.feuer at gmail.com>
> wrote:
> > CAN-OVERLAP and CAN-BE-OVERLAPPED are nice and clear. A little long,
> perhaps.
> >
> > On Tue, Jul 29, 2014 at 12:29 PM, Simon Peyton Jones
> > <simonpj at microsoft.com> wrote:
> >> 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
> >>
> >>
> >>
> >> From: Glasgow-haskell-users
> >> [mailto:glasgow-haskell-users-bounces at haskell.org] On Behalf Of
> Krzysztof
> >> Skrzetnicki
> >> Sent: 29 July 2014 16:56
> >> To: Brandon Allbery
> >> Cc: Simon Peyton Jones; Andreas Abel; GHC users; Haskell Libraries
> >> (libraries at haskell.org); ghc-devs
> >>
> >>
> >> Subject: Re: Overlapping and incoherent instances
> >>
> >>
> >>
> >> How about CAN_OVERLAP?
> >>
> >> --
> >> Krzysztof
> >>
> >> 29-07-2014 15:40, "Brandon Allbery" <allbery.b at gmail.com> napisał(a):
> >>
> >> On Tue, Jul 29, 2014 at 8:33 AM, Andreas Abel <andreas.abel at ifi.lmu.de>
> >> wrote:
> >>
> >> +1. I like Niklas' syntax better. Also OVERLAPPABLE is a horrible word,
> >> OVERLAPPING sound less formidable (even though it might be slightly less
> >> accurrate).
> >>
> >>
> >>
> >> We already get "overlap ok" in instance-related type errors, so
> OVERLAP_OK
> >> wouldn't be particularly alien even if it doesn't quite fit in with
> existing
> >> pragmas.
> >>
> >>
> >>
> >> --
> >>
> >> brandon s allbery kf8nh sine nomine
> associates
> >>
> >> allbery.b at gmail.com
> ballbery at sinenomine.net
> >>
> >> unix, openafs, kerberos, infrastructure, xmonad
> http://sinenomine.net
> >>
> >>
> >> _______________________________________________
> >> Libraries mailing list
> >> Libraries at haskell.org
> >> http://www.haskell.org/mailman/listinfo/libraries
> >>
> >>
> >> _______________________________________________
> >> Libraries mailing list
> >> Libraries at haskell.org
> >> http://www.haskell.org/mailman/listinfo/libraries
> >>
> > _______________________________________________
> > Libraries mailing list
> > Libraries at haskell.org
> > http://www.haskell.org/mailman/listinfo/libraries
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140729/07149e9b/attachment-0001.html>
More information about the ghc-devs
mailing list