Skip to content

Commit 964f44e

Browse files
halostatueharendra-kumar
authored andcommitted
Support GHC 9.12
GHC 9.12 uses base 4.21 and ghc-prim 0.13; I also When compiling with GHC 9.12.1, I got GHC-90584. I'm not a Haskell programmer, so I made the simplest changes that could work — I don't know how one would make the `deriving Typeable` conditional based on GHC version or if there would be some other way to do that.
1 parent c4812e2 commit 964f44e

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.github/workflows/packcheck.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ jobs:
8686
fail-fast: false
8787
matrix:
8888
name:
89+
- 9.12.1
8990
- 9.10.1
9091
- 9.8.1
9192
- 9.6.3
@@ -100,6 +101,12 @@ jobs:
100101
- 8.2.2
101102
- 8.0.2
102103
include:
104+
- name: 9.12.1
105+
ghc-version: 9.12.1
106+
command: cabal-v2
107+
runner: ubuntu-latest
108+
cabal-version: 3.14.1.1
109+
103110
- name: 9.10.1
104111
ghc-version: 9.10.1
105112
command: cabal-v2

Data/Unicode/Types.hs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ module Data.Unicode.Types
1919
NormalizationMode(..)
2020
) where
2121

22+
#if __GLASGOW_HASKELL__ < 912
2223
import Data.Typeable (Typeable)
24+
#endif
2325

2426
-- |
2527
-- Normalization transforms Unicode text into an equivalent
@@ -95,4 +97,8 @@ data NormalizationMode
9597
| NFKD -- ^ Compatibility decomposition.
9698
| NFC -- ^ Canonical decomposition followed by canonical composition.
9799
| NFKC -- ^ Compatibility decomposition followed by canonical composition.
98-
deriving (Eq, Show, Enum, Typeable)
100+
deriving (Eq, Show, Enum
101+
#if __GLASGOW_HASKELL__ < 912
102+
, Typeable
103+
#endif
104+
)

unicode-transforms.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ library
8787
hs-source-dirs: .
8888
ghc-options: -Wall -fwarn-identities -fwarn-incomplete-record-updates -fwarn-incomplete-uni-patterns -fwarn-tabs
8989
build-depends:
90-
base >= 4.8 && < 4.21
90+
base >= 4.8 && < 4.22
9191
, unicode-data >= 0.2 && < 0.7
9292
, bytestring >= 0.9 && < 0.13
93-
, ghc-prim >= 0.2 && < 0.12
93+
, ghc-prim >= 0.2 && < 0.14
9494

9595
-- We depend on a lot of internal modules in text. We keep the upper bound
9696
-- inclusive of the latest stable version.

0 commit comments

Comments
 (0)