Skip to content

Commit ce5d0f7

Browse files
authored
Merge pull request #9488 from cabalism/werror=unused-top-binds
Satisfy `-Werror=unused-top-binds`
2 parents 52d1fb6 + e693aaa commit ce5d0f7

File tree

2 files changed

+1
-64
lines changed
  • Cabal-tests/tests/UnitTests/Distribution

2 files changed

+1
-64
lines changed

Cabal-tests/tests/UnitTests/Distribution/SPDX.hs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE CPP #-}
21
{-# OPTIONS_GHC -fno-warn-deprecations #-}
32
module UnitTests.Distribution.SPDX (spdxTests) where
43

@@ -12,14 +11,6 @@ import Distribution.Pretty (prettyShow)
1211
import Test.Tasty
1312
import Test.Tasty.QuickCheck
1413

15-
#if MIN_VERSION_binary(0,7,0)
16-
import qualified Data.Binary as Binary
17-
import qualified Data.Binary.Get as Binary
18-
import qualified Data.Binary.Put as Binary
19-
import qualified Data.ByteString.Lazy as LBS
20-
import GHC.Generics (to, from)
21-
#endif
22-
2314
import Test.QuickCheck.Instances.Cabal ()
2415

2516
spdxTests :: [TestTree]
@@ -43,29 +34,6 @@ licenseExceptionIdRoundtrip x =
4334
counterexample (prettyShow x) $
4435
Right x === eitherParsec (prettyShow x)
4536

46-
#if MIN_VERSION_binary(0,7,0)
47-
licenseExceptionIdBinaryPut :: LicenseExceptionId -> Property
48-
licenseExceptionIdBinaryPut x =
49-
Binary.runPut (Binary.put x)
50-
===
51-
Binary.runPut (Binary.gput (from x))
52-
53-
licenseExceptionIdBinaryGet :: Word8 -> Property
54-
licenseExceptionIdBinaryGet w0 =
55-
stripMsg id (Binary.runGetOrFail Binary.get bs)
56-
===
57-
stripMsg to (Binary.runGetOrFail Binary.gget bs)
58-
where
59-
bs = LBS.pack [w0]
60-
61-
stripMsg
62-
:: (a -> LicenseExceptionId)
63-
-> Either (x, y, String) (x, y, a)
64-
-> Either (x, y) (x, y, LicenseExceptionId)
65-
stripMsg _ (Left (x,y,_)) = Left (x,y)
66-
stripMsg f (Right (x,y,t)) = Right (x,y,f t)
67-
#endif
68-
6937
licenseRefRoundtrip :: LicenseRef -> Property
7038
licenseRefRoundtrip x =
7139
counterexample (prettyShow x) $

Cabal-tests/tests/UnitTests/Distribution/Simple/Program/GHC.hs

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -190,35 +190,4 @@ options_9_0_all =
190190
options_9_0_affects :: [String]
191191
options_9_0_affects =
192192
[ "-fcmm-static-pred"
193-
]
194-
195-
-------------------------------------------------------------------------------
196-
-- GHC-9.2
197-
-------------------------------------------------------------------------------
198-
199-
options_9_2_all :: [String]
200-
options_9_2_all =
201-
[ "-dynohi"
202-
, "-ddump-c-backend"
203-
, "-ddump-stg-from-core"
204-
, "-ddump-stg"
205-
, "-ddump-faststrings"
206-
, "--run"
207-
, "-ffamily-application-cache"
208-
, "-fno-family-application-cache"
209-
] ++ options_9_2_affects
210-
211-
options_9_2_affects :: [String]
212-
options_9_2_affects =
213-
[ "-fprof-callers"
214-
, "-funfolding-case-threshold"
215-
, "-funfolding-case-scaling"
216-
, "-fdistinct-constructor-tables"
217-
, "-finfo-table-map"
218-
, "-fexpose-internal-symbols"
219-
, "-finline-generics"
220-
, "-finline-generics-aggressively"
221-
, "-fno-expose-internal-symbols"
222-
, "-fno-inline-generics"
223-
, "-fno-inline-generics-aggressively"
224-
]
193+
]

0 commit comments

Comments
 (0)