Proposal: Add exception info
Michael Snoyman
michael at snoyman.com
Tue Apr 21 13:53:51 UTC 2015
On Tue, Apr 21, 2015 at 3:48 PM Yitzchak Gale <gale at sefer.org> wrote:
> Michael Snoyman wrote:
> > I may also be missing something here, but my read of Michael Sloan's
> > proposal would mean that code written against the GHC 7.8/7.10 (and
> prior)
> > API would continue to compile against GHC 7.12 and forward. It's true
> that
> > code using the new functionality added in 7.12 would be unable to compile
> > with 7.10 and earlier, but that's always the case when expanding the API
> > (making this backwards compatible, or in PVP terms a minor version
> bump)...
> >
> > I may also not be addressing what you're thinking of as the "major
> > breakage." If so, can you clarify?
>
> You're right, "major breakage" was not the right term.
>
> What's worrying me is that since so many libraries depend on exceptions,
> a sudden breaking change like this would prevent new versions of
> almost any library from being used with 7.8. So, for example, critical
> security fixes could not be applied.
>
> In short, it would make 7.8 very fragile or even unusable very
> quickly, which would indeed be "major breakage" for those of
> us who will be needing to use it for the medium term.
>
> Is there some way that backwards compatibility could somehow
> be achieved without the requirement of a new extension like
> PatternSynonyms, even though that might be the prettiest way?
>
> One obvious way would be to use a new name for the new
> SomeException, or perhaps just a different module name,
> and export only a smart constructor for the new type. That
> way there could be a compatibility library in which the smart
> constructor discards the ExceptionInfo and returns the old type.
> That would work going way back.
>
> Or perhaps something could be done with other fancier
> type features already present in 7.8, in a way that would
> then allow us to move to Michael Sl.'s nice PatternSynonym
> solution in 7.14.
>
> Thanks,
> Yitz
>
Can you give an example of a concrete problem you're expecting to run into?
I'm not seeing it. End users aren't using pattern synonyms in this
proposal, it's an implementation detail of Control.Exception.
MIchael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150421/f3381b81/attachment.html>
More information about the Libraries
mailing list