Proposal: Add exception info
Yitzchak Gale
gale at sefer.org
Tue Apr 21 12:47:55 UTC 2015
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
More information about the Libraries
mailing list