Skip to content

Remove compatibility code for GHC < 8#285

Merged
sjakobi merged 1 commit intomasterfrom
drop-ghc-7-compat
Apr 15, 2026
Merged

Remove compatibility code for GHC < 8#285
sjakobi merged 1 commit intomasterfrom
drop-ghc-7-compat

Conversation

@sjakobi
Copy link
Copy Markdown
Collaborator

@sjakobi sjakobi commented Apr 14, 2026

Follow-up to 92cc704 (drop GHC 7 support). Remove code that was only
needed for GHC versions older than 8:

- Remove CPP macros always true with base >= 4.9:
  APPLICATIVE_MONAD, FUNCTOR_IDENTITY_IN_BASE, MONOID_IN_PRELUDE,
  NATURAL_IN_BASE, SEMIGROUP_IN_BASE

- Remove conditional dependencies on semigroups, fail, void, ghc-prim

- Always enable -Wcompat (was conditional on GHC >= 8.0)

- Remove doctest buildability conditions for GHC < 7.10

- Remove unused Control.Applicative imports (in Prelude since base 4.8)

Assisted-by: GLM-5 <noreply@fireworks.ai>

@sjakobi sjakobi force-pushed the drop-ghc-7-compat branch 4 times, most recently from 2dfd48e to 05bc7a7 Compare April 14, 2026 12:28
@sjakobi sjakobi marked this pull request as ready for review April 14, 2026 12:30
@sjakobi sjakobi requested a review from a-02 April 14, 2026 12:31
Follow-up to 92cc704 (drop GHC 7 support). Remove code that was only
needed for GHC versions older than 8:

- Remove CPP macros always true with base >= 4.9:
  APPLICATIVE_MONAD, FUNCTOR_IDENTITY_IN_BASE, MONOID_IN_PRELUDE,
  NATURAL_IN_BASE, SEMIGROUP_IN_BASE

- Remove conditional dependencies on semigroups, fail, void, ghc-prim

- Always enable -Wcompat (was conditional on GHC >= 8.0)

- Remove doctest buildability conditions for GHC < 7.10

- Remove unused Control.Applicative imports (in Prelude since base 4.8)

Assisted-by: GLM-5 <noreply@fireworks.ai>
@sjakobi sjakobi force-pushed the drop-ghc-7-compat branch from 05bc7a7 to 9de99fd Compare April 14, 2026 22:24
Copy link
Copy Markdown
Collaborator

@a-02 a-02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks a lot cleaner. Less stuff to worry about is always good.

Comment on lines +46 to +47
-- Note: 'split' is deprecated in random >= 1.2 in favor of 'splitGen'.
-- We could use 'splitGen' when support for GHC < 9.0 is dropped.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any timeline on this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. I would like to keep support for GHC 8 at least for the 1.8 release.

When keeping the compatibility becomes very onerous I don't mind dropping it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair, support for <9.0 isn't too hard (at the moment).

@sjakobi sjakobi merged commit fed7543 into master Apr 15, 2026
17 checks passed
@sjakobi sjakobi deleted the drop-ghc-7-compat branch April 15, 2026 21:48
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