Proposal: Add exception info
Michael Snoyman
michael at snoyman.com
Thu Apr 23 13:15:44 UTC 2015
On Thu, Apr 23, 2015 at 12:03 PM Yitzchak Gale <gale at sefer.org> wrote:
> I wrote:
> >> Package foo uploads a new version with a critical bug fix.
> >> As is often the case, this new version also supports updated
> >> dependencies, including exceptions. The new exceptions
> >> breaks the old SomeException type, so foo is forced to
> >> specify a lower bound that excludes the old exceptions.
>
> Michael Snoyman wrote:
> >> I'm not seeing a situation where an author couldn't easily
> >> be compatible with GHC <=7.8 by sticking to the
> >> old API?
>
> Felipe Lessa wrote:
> > I think Michael Gale
>
> heh
>
> > is thinking about an author that may end up using the new
> > SomeExceptionWithInfo constructor for some reason, thus
> > leaving older GHCs out of any new updates.
>
> Right, exactly what I was thinking. But perhaps
> Michael Sn. is correct that explicit use of a SomeException
> constructor is rare. (Which is what I think is what he means by
> "sticking to the old API".) If that is really true, then my objection
> is not valid.
>
> And I'm certainly strongly in favor of the goals of this
> proposal. So I'd be in favor even if *some* breakage
> results from it, as long as the overall deprecation curve
> isn't unreasonably steep.
>
> Thanks,
> Yitz
>
>
Maybe we're on the same page, but just to be sure, I'd like to clarify:
with Michael Sloan's proposal, you can still explicitly use the
SomeException constructor. Under GHC <=7.10 it's just a normal data
constructor. Under GHC >=7.12 it would be this pattern synonym thing (I
really haven't looked into the extension yet). Meaning that anything you
could do with GHC 7.10 and earlier could still be done with 7.12 without
any breakage.
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150423/51b90db5/attachment.html>
More information about the Libraries
mailing list