Skip to content
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

Merged
merged 9 commits into from
Apr 5, 2018

Conversation

RyanGlScott
Copy link
Member

This introduces base-compat-batteries, a variant of base-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:

  • See base-compat/README.md for an exact list of things that base-compat compared to base-compat-batteries.
  • The check test suite now uses base-compat-batteries, as it exposes the same API across more versions of base than base-compat does now.
  • Similarly, the test suite for base-compat has been migrated to base-compat-batteries, as it makes more sense to have a single home for it, and base-compat-batteries is strictly more defined.

Fixes #36, and checks off the 8.4-related boxes in #24.

module Base
#if !(MIN_VERSION_base(4,9,0))
, Semi.Semigroup((Semi.<>))
#endif
Copy link
Contributor

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?

Copy link
Member Author

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:

  1. Some folks want to avoid orphan instances as much as possible.
  2. 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.

Copy link
Contributor

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?

Copy link
Member Author

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 (
Copy link
Contributor

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?

Copy link
Member Author

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(..)
Copy link
Contributor

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.

Copy link
Member Author

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.

@RyanGlScott RyanGlScott merged commit 1008de7 into master Apr 5, 2018
@RyanGlScott RyanGlScott deleted the 8.4 branch April 5, 2018 17:13
phadej pushed a commit to phadej/base-compat that referenced this pull request Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants