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.10 #1367

Merged
merged 12 commits into from
Jul 4, 2024
Merged

support ghc-9.10 #1367

merged 12 commits into from
Jul 4, 2024

Conversation

larskuhtz
Copy link
Contributor

@larskuhtz larskuhtz commented Jun 30, 2024

Build system and CI:

  • remove redundant dependencies from cabal file
  • update cabal CI workflow to use cabal 3.12 and include build with GHC-9.10

Maintenance of dependencies:

  • remove vector-space dependency
  • upgrade to pact-time-0.3
  • upgrade to sbv-9.2 fork that supports GHC-9.10

Compiler warnings and deprecations:

  • add internal "unsafe" library for partial "base" functions. Avoids cluttering production code with {-# OPTIONS_GHC -fno-warn-x-partial #-} pragmas with GHC >=9.10.
  • Fix compiler warnings with GHC >=9.10 (foldl' is now in Prelude and uses of head and tail cause x-partial warning)

@larskuhtz larskuhtz force-pushed the lars/ghc-9.10 branch 2 times, most recently from a561a2d to d12f3c2 Compare July 1, 2024 22:05
@larskuhtz larskuhtz marked this pull request as ready for review July 1, 2024 22:10
@larskuhtz larskuhtz requested a review from rsoeldner July 1, 2024 22:13
@larskuhtz
Copy link
Contributor Author

larskuhtz commented Jul 1, 2024

Nix builds are failing with a somewhat cryptic message. Maybe the new version of pact-time on Hackage needs some time to propagate to nix?

Cabal builds are green.

pact.cabal Show resolved Hide resolved


-- |
-- Module: unsafe.Data.Foldable.Unsafe
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
-- Module: unsafe.Data.Foldable.Unsafe
-- Module: Data.Foldable.Unsafe

Comment on lines +70 to +71
-- This is to avoid cluttering production code with
-- `{-# OPTIONS_GHC -Wno-x-partial #-}` pragmas with base >= 4.20
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not disable it package-wide?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that it's generally good to keep the scope of disabled warnings narrow. If it was possible to scope it to an individual functions, I would have preferred that -- in that case this library would probably not be necessary, because one could annotate each use case in the original code.

os: ['ubuntu-20.04', 'ubuntu-22.04', 'macos-latest', 'macos-14']
ghc: ['9.6.6', '9.8.2', '9.10.1']
cabal: ['3.12']
os: ['ubuntu-20.04', 'ubuntu-22.04', 'macos-14']
cabalcache: ['true']
flags: ['+build-tool']
Copy link
Contributor

@edmundnoble edmundnoble Jul 4, 2024

Choose a reason for hiding this comment

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

The build with +build-tool still has a bunch of -Wx-partial warnings.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@edmundnoble sorry, I missed your comments when I hit the merge button (from the GitHub phone app). I'll address your comments in a follow up PR.

@larskuhtz larskuhtz merged commit 1be992a into master Jul 4, 2024
11 checks passed
@larskuhtz larskuhtz deleted the lars/ghc-9.10 branch July 4, 2024 17:45
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.

5 participants