-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce base-compat-batteries in preparation for a 8.4-ready release #43
Conversation
module Base | ||
#if !(MIN_VERSION_base(4,9,0)) | ||
, Semi.Semigroup((Semi.<>)) | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to depend and re-export base-orphans
's Data.Orphans
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pondered this. There's at least two complications:
- Some folks want to avoid orphan instances as much as possible.
- We'd need to reexport it from every module in this library if we want to be sure it's available everywhere.
As a result, I decided not to pursue this further.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good. Should that be documented in readme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -0,0 +1,37 @@ | |||
{-# LANGUAGE CPP, NoImplicitPrelude #-} | |||
module Data.Semigroup.Compat ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder, should there be a (haddock) note that (some) symbols are only for base-4.9
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
, WrappedMonoid(..) | ||
-- * Re-exported monoids from Data.Monoid | ||
, Dual(..) | ||
, Endo(..) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those could be exported for older base
too, but it's not biggie.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. I don't think I'll lose sleep over this, though, since they're simply reexports from Data.Monoid(.Compat)
, so folks will likely reach for that over Data.Semigroup.Compat
.
…askell-compat#43) (requires an sol/hpack@verbatim)
This introduces
base-compat-batteries
, a variant ofbase-compat
that depends on compatibility packages. Lots of internal reshuffling of the repo had to occur to make this happen, so this diff is quite large. Of note:base-compat/README.md
for an exact list of things thatbase-compat
compared tobase-compat-batteries
.check
test suite now usesbase-compat-batteries
, as it exposes the same API across more versions ofbase
thanbase-compat
does now.base-compat
has been migrated tobase-compat-batteries
, as it makes more sense to have a single home for it, andbase-compat-batteries
is strictly more defined.Fixes #36, and checks off the 8.4-related boxes in #24.