test-qc: replace deprecated TypeInType for GHC 9.14 strict builds

Open Beginner friendly
#447 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from haskell/primitive

All issues in haskell/primitive

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.