test-qc: replace deprecated TypeInType for GHC 9.14 strict builds
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- haskell
- Domain
- testing-qa
Research direction
Start in test/Main.hs, inside the existing GHC version CPP guard, and review the reported deprecated TypeInType warning. Run cabal test primitive:test:test-qc --test-show-details=direct with GHC 9.14.1 and -Werror. Done means the test suite compiles without the deprecation warning and all 385 tests pass, without suppressing warnings or removing cases.
Written by the indexing model from the issue text.
Description
On GHC 9.14.1, test-qc at 2fdb2a9786e4ec9c15185804d1378360f3fcd058 fails when built with -Werror:
test/Main.hs:14:14: error: [GHC-53692] [-Wdeprecated-flags, Werror=deprecated-flags]
-XTypeInType is deprecated: use -XDataKinds and -XPolyKinds instead
Replacing that pragma inside its existing CPP guard fixes the build:
#if __GLASGOW_HASKELL__ >= 805
{-# LANGUAGE DerivingVia #-}
-{-# LANGUAGE TypeInType #-}
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE PolyKinds #-}
#endif
Before: test compilation fails. After: all 385 tests pass with -Werror, with no test cases removed and no additional warning suppression. Tested on Linux with Cabal 3.16.1.0 and this project configuration:
packages: .
with-compiler: ghc-9.14.1
index-state: 2026-09-12T04:56:46Z
optimization: 2
tests: True
benchmarks: False
constraints: base ==4.22.0.0, deepseq ==1.5.1.0,
transformers ==0.6.1.2, template-haskell ==2.24.0.0,
QuickCheck ==2.15.0.1
package primitive
ghc-options: -Werror -optl-fuse-ld=lld
Run cabal test primitive:test:test-qc --test-show-details=direct with LLVM lld installed. The comparison used separate build directories and an initially empty separate Cabal store. No allow-newer was needed. I have not tested the pragma change across the older supported GHC versions.
We found this while checking the dependencies of our TLS application under a warning-fatal build policy. The latest published Primitive 0.9.1.0 also fails that policy on three deprecated mutable-array size primops. I see #434 already handles those library warnings on master with module-level -Wno-deprecations; that is separate from this remaining test warning. A release containing that work and this test fix would help us validate the published package's own suite. Happy to contribute the test-source change and supply the captured logs/plans.
- Dominant language
- Haskell
- Stars
- 123
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from haskell/primitive
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
MicroHs support Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
documentation
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in haskell/primitive
Similar issues
-
chore
Difficulty 1/5 Under an hour Newbie friendliness 91/100
alunduil/alunduil-chezmoi#792 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
koalaman/shellcheck#3539 ·
-
time-manager-0.4.0 Openfailure: bounds
Difficulty 1/5 Under an hour Newbie friendliness 72/100
commercialhaskell/stackage#8122 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
objectionary/phino#1350 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100