Skip to content

Commit ac31991

Browse files
jkeuhlenclaude
andcommitted
ci: constrain megaparsec < 9.8 on GHC < 9.10
CI builds recently started failing on GHC 8.8–9.8 with: Text/Megaparsec/Stream.hs:517:26: error: Variable not in scope: foldl' Failed to build megaparsec-9.8.0 megaparsec-9.8.0 uses an unqualified `foldl'`, which is only re-exported from Prelude as of base-4.20 (GHC 9.10). Because CI runs `cabal v2-freeze` fresh on every run (no committed freeze file), it floats to the newest Hackage release, and 9.8.0 fails to compile on every GHC below 9.10. Pin megaparsec < 9.8 for those compilers via a project conditional; GHC 9.10+ continue to use 9.8.0, which builds there without issue. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 855c20c commit ac31991

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

cabal.project

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ allow-newer:
2020
, bytestring-lexing:base
2121
, postgresql-simple-interval:persistent
2222

23+
-- megaparsec 9.8.0 uses an unqualified `foldl'`, which is only re-exported from
24+
-- Prelude as of base-4.20 (GHC 9.10). On older GHCs it fails to compile with
25+
-- "Variable not in scope: foldl'". Pin to < 9.8 there; newer GHCs build it fine.
26+
if impl(ghc < 9.10)
27+
constraints: megaparsec < 9.8
28+
2329
source-repository-package
2430
type: git
2531
location: https://github.com/parsonsmatt/mysql

0 commit comments

Comments
 (0)