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

Allow GHC 9.8 #503

Closed
wants to merge 2 commits into from
Closed

Allow GHC 9.8 #503

wants to merge 2 commits into from

Conversation

ysangkok
Copy link
Contributor

Fixes #502

Copy link
Member

@moodmosaic moodmosaic left a comment

Choose a reason for hiding this comment

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

LGTM! Just left a comment.

packages: .
if impl(ghc >= 9.6)
package hedgehog
ghc-options: -Wwarn=x-partial
Copy link
Member

Choose a reason for hiding this comment

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

That’s interesting. Have you kept the error produced without this option?

Copy link
Contributor

Choose a reason for hiding this comment

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

The error is in the CI build for this PR so it seems the attempt at disabling it failed to take effect for some reason.

src/Hedgehog/Internal/Property.hs:429:31: error: [GHC-63394] [-Wx-partial, -Werror=x-partial]
Error:     In the use of ‘head’
    (imported from Hedgehog.Internal.Prelude, but defined in GHC.List):
    "This is a partial function, it throws an error on empty lists. Use pattern matching or Data.List.uncons instead. Consider refactoring to use Data.List.NonEmpty."
    |
429 |     groups = List.map (\l -> (head l, length l)) $ List.group sp
    |                               ^^^^

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it failed because cabal.project was added in a place where it's not being picked up.

Copy link
Contributor

Choose a reason for hiding this comment

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

I submitted an amended PR that fixes this: #504

@tomjaguarpaw tomjaguarpaw mentioned this pull request Oct 16, 2023
@ysangkok ysangkok closed this Oct 16, 2023
@ysangkok ysangkok deleted the janus/ghc-9.8 branch October 16, 2023 20:52
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.

Support ghc-9.8.1
3 participants