Skip to content

Commit 3792794

Browse files
authored
CI: add GHC 9.12 (haskell#10667)
* GHC 9.12 compat: deriving Typeable has to go 9.12 turned it into a warning * GHC 9.12 compat: ErrorCallWithLocation got deprecated * CI: add 9.12
1 parent 731f699 commit 3792794

File tree

132 files changed

+173
-259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+173
-259
lines changed

.github/workflows/validate.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ jobs:
8080
# support, so the PR *must* have a changelog entry.
8181
ghc:
8282
[
83+
"9.12.1",
8384
"9.10.1",
84-
"9.8.2",
85+
"9.8.4",
8586
"9.6.6",
8687
"9.4.8",
8788
"9.2.8",

Cabal-syntax/src/Distribution/Backpack.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ data OpenUnitId
8989
-- MUST NOT be for an indefinite component; an 'OpenUnitId'
9090
-- is guaranteed not to have any holes.
9191
DefiniteUnitId DefUnitId
92-
deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
92+
deriving (Generic, Read, Show, Eq, Ord, Data)
9393

9494
-- TODO: cache holes?
9595

@@ -163,7 +163,7 @@ mkDefUnitId cid insts =
163163
data OpenModule
164164
= OpenModule OpenUnitId ModuleName
165165
| OpenModuleVar ModuleName
166-
deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
166+
deriving (Generic, Read, Show, Eq, Ord, Data)
167167

168168
instance Binary OpenModule
169169
instance Structured OpenModule

Cabal-syntax/src/Distribution/CabalSpecVersion.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ data CabalSpecVersion
3535
| -- 3.10: no changes
3636
CabalSpecV3_12
3737
| CabalSpecV3_14
38-
deriving (Eq, Ord, Show, Read, Enum, Bounded, Typeable, Data, Generic)
38+
deriving (Eq, Ord, Show, Read, Enum, Bounded, Data, Generic)
3939

4040
instance Binary CabalSpecVersion
4141
instance Structured CabalSpecVersion

Cabal-syntax/src/Distribution/Compat/Graph.hs

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{-# LANGUAGE BangPatterns #-}
22
{-# LANGUAGE CPP #-}
3-
{-# LANGUAGE DeriveDataTypeable #-}
43
{-# LANGUAGE FlexibleContexts #-}
54
{-# LANGUAGE ScopedTypeVariables #-}
65
{-# LANGUAGE TypeFamilies #-}
@@ -122,7 +121,6 @@ data Graph a = Graph
122121
, graphKeyToVertex :: Key a -> Maybe G.Vertex
123122
, graphBroken :: [(a, [Key a])]
124123
}
125-
deriving (Typeable)
126124

127125
-- NB: Not a Functor! (or Traversable), because you need
128126
-- to restrict Key a ~ Key b. We provide our own mapping

Cabal-syntax/src/Distribution/Compat/NonEmptySet.hs

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import Control.DeepSeq (NFData (..))
3333
import Data.Data (Data)
3434
import Data.List.NonEmpty (NonEmpty (..))
3535
import Data.Semigroup (Semigroup (..))
36-
import Data.Typeable (Typeable)
3736

3837
import qualified Data.Foldable as F
3938
import qualified Data.Set as Set
@@ -49,7 +48,7 @@ import Control.Monad (fail)
4948

5049
-- | @since 3.4.0.0
5150
newtype NonEmptySet a = NES (Set.Set a)
52-
deriving (Eq, Ord, Typeable, Data, Read)
51+
deriving (Eq, Ord, Data, Read)
5352

5453
-------------------------------------------------------------------------------
5554
-- Instances

Cabal-syntax/src/Distribution/Compat/Semigroup.hs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{-# LANGUAGE CPP #-}
2-
{-# LANGUAGE DeriveDataTypeable #-}
32
{-# LANGUAGE DeriveGeneric #-}
43
{-# LANGUAGE FlexibleContexts #-}
54
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
@@ -18,7 +17,6 @@ module Distribution.Compat.Semigroup
1817
, gmempty
1918
) where
2019

21-
import Data.Typeable (Typeable)
2220
import Distribution.Compat.Binary (Binary)
2321
import Distribution.Utils.Structured (Structured)
2422

@@ -39,7 +37,7 @@ instance Semigroup (First' a) where
3937

4038
-- | A copy of 'Data.Semigroup.Last'.
4139
newtype Last' a = Last' {getLast' :: a}
42-
deriving (Eq, Ord, Read, Show, Generic, Binary, Typeable)
40+
deriving (Eq, Ord, Read, Show, Generic, Binary)
4341

4442
instance Structured a => Structured (Last' a)
4543

@@ -52,7 +50,7 @@ instance Functor Last' where
5250
-- | A wrapper around 'Maybe', providing the 'Semigroup' and 'Monoid' instances
5351
-- implemented for 'Maybe' since @base-4.11@.
5452
newtype Option' a = Option' {getOption' :: Maybe a}
55-
deriving (Eq, Ord, Read, Show, Binary, Generic, Functor, Typeable)
53+
deriving (Eq, Ord, Read, Show, Binary, Generic, Functor)
5654

5755
instance Structured a => Structured (Option' a)
5856

Cabal-syntax/src/Distribution/Compiler.hs

+3-4
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ data CompilerFlavor
7676
| MHS -- MicroHS, see https://github.com/augustss/MicroHs
7777
| HaskellSuite String -- string is the id of the actual compiler
7878
| OtherCompiler String
79-
deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
79+
deriving (Generic, Show, Read, Eq, Ord, Data)
8080

8181
instance Binary CompilerFlavor
8282
instance Structured CompilerFlavor
@@ -141,7 +141,6 @@ data PerCompilerFlavor v = PerCompilerFlavor v v
141141
, Read
142142
, Eq
143143
, Ord
144-
, Typeable
145144
, Data
146145
, Functor
147146
, Foldable
@@ -172,7 +171,7 @@ instance (Semigroup a, Monoid a) => Monoid (PerCompilerFlavor a) where
172171
-- ------------------------------------------------------------
173172

174173
data CompilerId = CompilerId CompilerFlavor Version
175-
deriving (Eq, Generic, Ord, Read, Show, Typeable)
174+
deriving (Eq, Generic, Ord, Read, Show)
176175

177176
instance Binary CompilerId
178177
instance Structured CompilerId
@@ -222,7 +221,7 @@ instance Binary CompilerInfo
222221
data AbiTag
223222
= NoAbiTag
224223
| AbiTag String
225-
deriving (Eq, Generic, Show, Read, Typeable)
224+
deriving (Eq, Generic, Show, Read)
226225

227226
instance Binary AbiTag
228227
instance Structured AbiTag

Cabal-syntax/src/Distribution/License.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ data License
111111
OtherLicense
112112
| -- | Indicates an erroneous license name.
113113
UnknownLicense String
114-
deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
114+
deriving (Generic, Read, Show, Eq, Ord, Data)
115115

116116
instance Binary License
117117
instance Structured License

Cabal-syntax/src/Distribution/ModuleName.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import qualified Text.PrettyPrint as Disp
4040

4141
-- | A valid Haskell module name.
4242
newtype ModuleName = ModuleName ShortText
43-
deriving (Eq, Generic, Ord, Read, Show, Typeable, Data)
43+
deriving (Eq, Generic, Ord, Read, Show, Data)
4444

4545
unModuleName :: ModuleName -> String
4646
unModuleName (ModuleName s) = fromShortText s

Cabal-syntax/src/Distribution/SPDX/License.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ data License
4141
NONE
4242
| -- | A valid SPDX License Expression as defined in Appendix IV.
4343
License LicenseExpression
44-
deriving (Show, Read, Eq, Ord, Typeable, Data, Generic)
44+
deriving (Show, Read, Eq, Ord, Data, Generic)
4545

4646
instance Binary License
4747
instance Structured License

Cabal-syntax/src/Distribution/SPDX/LicenseExceptionId.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ data LicenseExceptionId
104104
| Vsftpd_openssl_exception -- ^ @vsftpd-openssl-exception@, vsftpd OpenSSL exception, SPDX License List 3.23, SPDX License List 3.25
105105
| WxWindows_exception_3_1 -- ^ @WxWindows-exception-3.1@, WxWindows Library Exception 3.1
106106
| X11vnc_openssl_exception -- ^ @x11vnc-openssl-exception@, x11vnc OpenSSL Exception, SPDX License List 3.23, SPDX License List 3.25
107-
deriving (Eq, Ord, Enum, Bounded, Show, Read, Typeable, Data, Generic)
107+
deriving (Eq, Ord, Enum, Bounded, Show, Read, Data, Generic)
108108

109109
instance Binary LicenseExceptionId where
110110
put = Binary.putWord8 . fromIntegral . fromEnum

Cabal-syntax/src/Distribution/SPDX/LicenseExpression.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ data LicenseExpression
4343
= ELicense !SimpleLicenseExpression !(Maybe LicenseExceptionId)
4444
| EAnd !LicenseExpression !LicenseExpression
4545
| EOr !LicenseExpression !LicenseExpression
46-
deriving (Show, Read, Eq, Ord, Typeable, Data, Generic)
46+
deriving (Show, Read, Eq, Ord, Data, Generic)
4747

4848
-- | Simple License Expressions.
4949
data SimpleLicenseExpression
@@ -53,7 +53,7 @@ data SimpleLicenseExpression
5353
ELicenseIdPlus LicenseId
5454
| -- | A SPDX user defined license reference: For example: @LicenseRef-23@, @LicenseRef-MIT-Style-1@, or @DocumentRef-spdx-tool-1.2:LicenseRef-MIT-Style-2@
5555
ELicenseRef LicenseRef
56-
deriving (Show, Read, Eq, Ord, Typeable, Data, Generic)
56+
deriving (Show, Read, Eq, Ord, Data, Generic)
5757

5858
simpleLicenseExpression :: LicenseId -> LicenseExpression
5959
simpleLicenseExpression i = ELicense (ELicenseId i) Nothing

Cabal-syntax/src/Distribution/SPDX/LicenseId.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ data LicenseId
674674
| ZPL_1_1 -- ^ @ZPL-1.1@, Zope Public License 1.1
675675
| ZPL_2_0 -- ^ @ZPL-2.0@, Zope Public License 2.0
676676
| ZPL_2_1 -- ^ @ZPL-2.1@, Zope Public License 2.1
677-
deriving (Eq, Ord, Enum, Bounded, Show, Read, Typeable, Data)
677+
deriving (Eq, Ord, Enum, Bounded, Show, Read, Data)
678678

679679
instance Binary LicenseId where
680680
-- Word16 is encoded in big endianness

Cabal-syntax/src/Distribution/SPDX/LicenseReference.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ data LicenseRef = LicenseRef
2424
{ _lrDocument :: !(Maybe String)
2525
, _lrLicense :: !String
2626
}
27-
deriving (Show, Read, Eq, Ord, Typeable, Data, Generic)
27+
deriving (Show, Read, Eq, Ord, Data, Generic)
2828

2929
-- | License reference.
3030
licenseRef :: LicenseRef -> String

Cabal-syntax/src/Distribution/System.hs

+3-3
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ data OS
110110
| Wasi
111111
| Haiku
112112
| OtherOS String
113-
deriving (Eq, Generic, Ord, Show, Read, Typeable, Data)
113+
deriving (Eq, Generic, Ord, Show, Read, Data)
114114

115115
instance Binary OS
116116
instance Structured OS
@@ -213,7 +213,7 @@ data Arch
213213
| JavaScript
214214
| Wasm32
215215
| OtherArch String
216-
deriving (Eq, Generic, Ord, Show, Read, Typeable, Data)
216+
deriving (Eq, Generic, Ord, Show, Read, Data)
217217

218218
instance Binary Arch
219219
instance Structured Arch
@@ -284,7 +284,7 @@ buildArch = classifyArch Permissive System.Info.arch
284284
-- ------------------------------------------------------------
285285

286286
data Platform = Platform Arch OS
287-
deriving (Eq, Generic, Ord, Show, Read, Typeable, Data)
287+
deriving (Eq, Generic, Ord, Show, Read, Data)
288288

289289
instance Binary Platform
290290
instance Structured Platform

Cabal-syntax/src/Distribution/Types/AbiDependency.hs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE DeriveDataTypeable #-}
21
{-# LANGUAGE DeriveGeneric #-}
32

43
module Distribution.Types.AbiDependency where
@@ -27,7 +26,7 @@ data AbiDependency = AbiDependency
2726
{ depUnitId :: Package.UnitId
2827
, depAbiHash :: Package.AbiHash
2928
}
30-
deriving (Eq, Generic, Read, Show, Typeable)
29+
deriving (Eq, Generic, Read, Show)
3130

3231
instance Pretty AbiDependency where
3332
pretty (AbiDependency uid abi) =

Cabal-syntax/src/Distribution/Types/AbiHash.hs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE DeriveDataTypeable #-}
21
{-# LANGUAGE DeriveGeneric #-}
32

43
module Distribution.Types.AbiHash
@@ -26,7 +25,7 @@ import Text.PrettyPrint (text)
2625
--
2726
-- @since 2.0.0.2
2827
newtype AbiHash = AbiHash ShortText
29-
deriving (Eq, Show, Read, Generic, Typeable)
28+
deriving (Eq, Show, Read, Generic)
3029

3130
-- | Convert 'AbiHash' to 'String'
3231
--

Cabal-syntax/src/Distribution/Types/Benchmark.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ data Benchmark = Benchmark
2727
, benchmarkInterface :: BenchmarkInterface
2828
, benchmarkBuildInfo :: BuildInfo
2929
}
30-
deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
30+
deriving (Generic, Show, Read, Eq, Ord, Data)
3131

3232
instance Binary Benchmark
3333
instance Structured Benchmark

Cabal-syntax/src/Distribution/Types/BenchmarkInterface.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ data BenchmarkInterface
2727
| -- | A benchmark that does not conform to one of the above
2828
-- interfaces for the given reason (e.g. unknown benchmark type).
2929
BenchmarkUnsupported BenchmarkType
30-
deriving (Eq, Ord, Generic, Read, Show, Typeable, Data)
30+
deriving (Eq, Ord, Generic, Read, Show, Data)
3131

3232
instance Binary BenchmarkInterface
3333
instance Structured BenchmarkInterface

Cabal-syntax/src/Distribution/Types/BenchmarkType.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ data BenchmarkType
2222
BenchmarkTypeExe Version
2323
| -- | Some unknown benchmark type e.g. \"type: foo\"
2424
BenchmarkTypeUnknown String Version
25-
deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
25+
deriving (Generic, Show, Read, Eq, Ord, Data)
2626

2727
instance Binary BenchmarkType
2828
instance Structured BenchmarkType

Cabal-syntax/src/Distribution/Types/BuildInfo.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ data BuildInfo = BuildInfo
144144
-- ^ Dependencies specific to a library or executable target
145145
, mixins :: [Mixin]
146146
}
147-
deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
147+
deriving (Generic, Show, Read, Eq, Ord, Data)
148148

149149
instance Binary BuildInfo
150150
instance Structured BuildInfo

Cabal-syntax/src/Distribution/Types/BuildType.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ data BuildType
3030
| -- | uses user-supplied @Setup.hs@ or @Setup.lhs@ (default)
3131
Custom
3232
| Hooks
33-
deriving (Generic, Show, Read, Eq, Ord, Typeable, Data)
33+
deriving (Generic, Show, Read, Eq, Ord, Data)
3434

3535
instance Binary BuildType
3636
instance Structured BuildType

Cabal-syntax/src/Distribution/Types/ComponentId.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import Text.PrettyPrint (text)
3131
--
3232
-- @since 2.0.0.2
3333
newtype ComponentId = ComponentId ShortText
34-
deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
34+
deriving (Generic, Read, Show, Eq, Ord, Data)
3535

3636
-- | Construct a 'ComponentId' from a 'String'
3737
--

Cabal-syntax/src/Distribution/Types/ComponentName.hs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE DeriveDataTypeable #-}
21
{-# LANGUAGE DeriveGeneric #-}
32
{-# LANGUAGE PatternSynonyms #-}
43

@@ -25,14 +24,14 @@ import qualified Text.PrettyPrint as Disp
2524
data ComponentName
2625
= CLibName LibraryName
2726
| CNotLibName NotLibComponentName
28-
deriving (Eq, Generic, Ord, Read, Show, Typeable)
27+
deriving (Eq, Generic, Ord, Read, Show)
2928

3029
data NotLibComponentName
3130
= CNLFLibName {toCompName :: UnqualComponentName}
3231
| CNLExeName {toCompName :: UnqualComponentName}
3332
| CNLTestName {toCompName :: UnqualComponentName}
3433
| CNLBenchName {toCompName :: UnqualComponentName}
35-
deriving (Eq, Generic, Ord, Read, Show, Typeable)
34+
deriving (Eq, Generic, Ord, Read, Show)
3635

3736
pattern CFLibName :: UnqualComponentName -> ComponentName
3837
pattern CFLibName n = CNotLibName (CNLFLibName n)

Cabal-syntax/src/Distribution/Types/ComponentRequestedSpec.hs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE DeriveDataTypeable #-}
21
{-# LANGUAGE DeriveGeneric #-}
32

43
module Distribution.Types.ComponentRequestedSpec
@@ -67,7 +66,7 @@ data ComponentRequestedSpec
6766
, benchmarksRequested :: Bool
6867
}
6968
| OneComponentRequestedSpec ComponentName
70-
deriving (Generic, Read, Show, Eq, Typeable)
69+
deriving (Generic, Read, Show, Eq)
7170

7271
instance Binary ComponentRequestedSpec
7372
instance Structured ComponentRequestedSpec

Cabal-syntax/src/Distribution/Types/CondTree.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ data CondTree v c a = CondNode
5959
, condTreeConstraints :: c
6060
, condTreeComponents :: [CondBranch v c a]
6161
}
62-
deriving (Show, Eq, Typeable, Data, Generic, Functor, Foldable, Traversable)
62+
deriving (Show, Eq, Data, Generic, Functor, Foldable, Traversable)
6363

6464
instance (Binary v, Binary c, Binary a) => Binary (CondTree v c a)
6565
instance (Structured v, Structured c, Structured a) => Structured (CondTree v c a)
@@ -80,7 +80,7 @@ data CondBranch v c a = CondBranch
8080
, condBranchIfTrue :: CondTree v c a
8181
, condBranchIfFalse :: Maybe (CondTree v c a)
8282
}
83-
deriving (Show, Eq, Typeable, Data, Generic, Functor, Traversable)
83+
deriving (Show, Eq, Data, Generic, Functor, Traversable)
8484

8585
-- This instance is written by hand because GHC 8.0.1/8.0.2 infinite
8686
-- loops when trying to derive it with optimizations. See

Cabal-syntax/src/Distribution/Types/Condition.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ data Condition c
1919
| CNot (Condition c)
2020
| COr (Condition c) (Condition c)
2121
| CAnd (Condition c) (Condition c)
22-
deriving (Show, Eq, Typeable, Data, Generic)
22+
deriving (Show, Eq, Data, Generic)
2323

2424
-- | Boolean negation of a 'Condition' value.
2525
cNot :: Condition a -> Condition a

Cabal-syntax/src/Distribution/Types/ConfVar.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ data ConfVar
1919
| Arch Arch
2020
| PackageFlag FlagName
2121
| Impl CompilerFlavor VersionRange
22-
deriving (Eq, Show, Typeable, Data, Generic)
22+
deriving (Eq, Show, Data, Generic)
2323

2424
instance Binary ConfVar
2525
instance Structured ConfVar

Cabal-syntax/src/Distribution/Types/Dependency.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ data Dependency
4141
PackageName
4242
VersionRange
4343
(NonEmptySet LibraryName)
44-
deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
44+
deriving (Generic, Read, Show, Eq, Ord, Data)
4545

4646
depPkgName :: Dependency -> PackageName
4747
depPkgName (Dependency pn _ _) = pn

0 commit comments

Comments
 (0)