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

Support GHC-9.2.2 #252

Merged
merged 7 commits into from
Apr 22, 2022
Merged

Support GHC-9.2.2 #252

merged 7 commits into from
Apr 22, 2022

Conversation

gromakovsky
Copy link
Member

@gromakovsky gromakovsky commented Mar 27, 2022

Description

The primary goal of this PR is to make sure that universum can be built with GHC-9.2.2.

Related issues(s)

None

✓ Checklist for your Pull Request

Ideally a PR has all of the checkmarks set.

If something in this list is irrelevant to your PR, you should still set this
checkmark indicating that you are sure it is dealt with (be that by irrelevance).

  • I made sure my PR addresses a single concern, or multiple concerns which
    are inextricably linked. Otherwise I should open multiple PR's.
  • If your PR fixes/relates to an open issue then the description should
    reference this issue. See also auto linking on
    github
    .

Related changes (conditional)

  • Tests

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from
      silently reappearing again.
  • Documentation

    I checked whether I should update the docs and did so if necessary:

  • Record your changes

    • I added an entry to the changelog if my changes are visible to the users
      and
    • provided a migration guide for breaking changes if possible

Stylistic guide (mandatory)

  • My commit history is clean (only contains changes relating to my
    issue/pull request and no reverted-my-earlier-commit changes) and commit
    messages start with identifiers of related issues in square brackets.

    Example: [#42] Short commit description

    If necessary both of these can be achieved even after the commits have been
    made/pushed using rebase and squash.

Copy link
Member

@dcastro dcastro left a comment

Choose a reason for hiding this comment

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

LGTM 😄

Problem: `Option` type is useless nowadays because it's absolutely
equivalent to `Maybe`. It exists for historical reasons, it was
deprecated in base-4.15 and removed in base-4.16.
So Universum.Monoid no longer compiles with base-4.16.

Solution: just remove this re-export because properly deprecating
it supporting multiple GHC versions will likely involve too much
CPP and doesn't sound paricularly useful because hopefully nobody
used Option anyway (it's pretty much useless for a long time).
Support 9.2.2, drop support for 8.4.4 to avoid supporting too
many versions (which is tedious).
Otherwise the compiler doesn't like the following constraint:
`SuperComposition (a -> b) d r1`.
This is a new warning in GHC, it wants us to write
```
type ToPairs :: * -> Constraint
```
in addition to
```
class ToPairs t where
```

I am not sure it's a good idea to require it everywhere, so for
now I just disable this warning to let the existing code compile
without warnings.
Problem: universum-doctest passes with GHC < 9, but starts to
fail with >= 9. The errors are weird, it complains that a lot of
stuff is not in scope. Example:
> Not in scope: type constructor or class ‘Text’

Solution: there is the following issue
sol/doctest#327. Apparently, something is
wrong in `doctest` itself. The maintainer intends to investigate it,
so let's wait for that. While waiting, let's disable
`universum-doctest` whenever GHC is >= 9.0.0.
@gromakovsky gromakovsky merged commit e4ed7f5 into master Apr 22, 2022
@delete-merged-branch delete-merged-branch bot deleted the gromak/support-ghc-9.2 branch April 22, 2022 11:37
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