haskell / haskell/primitive

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

Open Beginner friendly
#447 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
123
Forks
60
PR merge metrics
No merged PRs in 30d

Description

On GHC 9.14.1, `test-qc` at `2fdb2a9786e4ec9c15185804d1378360f3fcd058` fails when built with `-Werror`:

```text
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:

```diff
#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:

```cabal
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.

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

Tech stack
haskell
Domain
testing-qa
Issue type
Bug
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.