Skip to content

Commit 1de8c17

Browse files
authored
Merge pull request #836 from IntersectMBO/jordan/remove-8.10.7-support
Remove 8.10.7 support
2 parents 6897855 + c35e549 commit 1de8c17

File tree

8 files changed

+218
-224
lines changed

8 files changed

+218
-224
lines changed

.github/workflows/haskell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
ghc: ["8.10.7", "9.6", "9.12"]
23+
ghc: ["9.6", "9.12"]
2424
cabal: ["3.14"]
2525
sys:
2626
- { os: windows-latest, shell: 'C:/msys64/usr/bin/bash.exe -e {0}' }

cardano-api/cardano-api.cabal

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ common project-config
3737
-Wredundant-constraints
3838
-Wunused-packages
3939

40-
if impl(ghc < 9)
41-
ghc-options: -Wno-incomplete-patterns
42-
4340
common maybe-unix
4441
if !os(windows)
4542
build-depends: unix
@@ -49,7 +46,7 @@ common maybe-Win32
4946
build-depends: Win32
5047

5148
common text
52-
if impl(ghc == 8.10.7)&& os(osx)&& arch(aarch64)
49+
if os(osx)&& arch(aarch64)
5350
build-depends: text >=1.2.5.0
5451
else
5552
build-depends: text >=2.0

cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs

Lines changed: 180 additions & 165 deletions
Large diffs are not rendered by default.

cardano-api/src/Cardano/Api/Internal/Keys/Class.hs

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE CPP #-}
21
{-# LANGUAGE FlexibleContexts #-}
32
{-# LANGUAGE MultiParamTypeClasses #-}
43
{-# LANGUAGE TypeFamilies #-}
@@ -13,18 +12,18 @@ module Cardano.Api.Internal.Keys.Class
1312
)
1413
where
1514

16-
import Cardano.Api.Internal.Hash
17-
import Cardano.Api.Internal.HasTypeProxy
18-
import Cardano.Api.Internal.SerialiseRaw
19-
import Cardano.Api.Internal.SerialiseTextEnvelope
15+
import Cardano.Api.Internal.HasTypeProxy
16+
import Cardano.Api.Internal.Hash
17+
import Cardano.Api.Internal.SerialiseRaw
18+
import Cardano.Api.Internal.SerialiseTextEnvelope
2019

21-
import qualified Cardano.Crypto.DSIGN.Class as Crypto
22-
import qualified Cardano.Crypto.Seed as Crypto
20+
import Cardano.Crypto.DSIGN.Class qualified as Crypto
21+
import Cardano.Crypto.Seed qualified as Crypto
2322

24-
import Control.Monad.IO.Class
25-
import Data.Kind (Type)
26-
import qualified System.Random as Random
27-
import System.Random (StdGen)
23+
import Control.Monad.IO.Class
24+
import Data.Kind (Type)
25+
import System.Random (StdGen)
26+
import System.Random qualified as Random
2827

2928
-- | An interface for cryptographic keys used for signatures with a 'SigningKey'
3029
-- and a 'VerificationKey' key.
@@ -50,12 +49,7 @@ class
5049
-- | Get the corresponding verification key from a signing key.
5150
getVerificationKey
5251
:: ()
53-
#if MIN_VERSION_base(4,17,0)
54-
-- GHC 8.10 considers this constraint redundant but ghc-9.6 complains if its not present.
55-
-- More annoyingly, absence of this constraint does not manifest in this repo, but in
56-
-- `cardano-cli` :facepalm:.
5752
=> HasTypeProxy keyrole
58-
#endif
5953
=> SigningKey keyrole
6054
-> VerificationKey keyrole
6155

cardano-api/src/Cardano/Api/Internal/Utils.hs

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
{-# LANGUAGE CPP #-}
21
{-# LANGUAGE FlexibleContexts #-}
32
{-# LANGUAGE GADTs #-}
43
{-# LANGUAGE LambdaCase #-}
54
{-# LANGUAGE RankNTypes #-}
65
{-# LANGUAGE ScopedTypeVariables #-}
76
{-# LANGUAGE TypeApplications #-}
87

9-
#if !defined(mingw32_HOST_OS)
10-
#define UNIX
11-
#endif
12-
138
-- | Internal utils for the other Api modules
149
module Cardano.Api.Internal.Utils
1510
( (?!)
@@ -32,21 +27,22 @@ where
3227

3328
import Cardano.Ledger.BaseTypes
3429
import Cardano.Ledger.Shelley ()
30+
3531
import Control.Exception (bracket)
36-
import qualified Data.Aeson.Types as Aeson
37-
import qualified Data.ByteString as BS
38-
import qualified Data.ByteString.Builder as Builder
39-
import qualified Data.ByteString.Lazy as LBS
32+
import Data.Aeson.Types qualified as Aeson
33+
import Data.ByteString qualified as BS
34+
import Data.ByteString.Builder qualified as Builder
35+
import Data.ByteString.Lazy qualified as LBS
4036
import Data.Maybe
4137
import Data.Text (Text)
42-
import qualified Data.Text as Text
38+
import Data.Text qualified as Text
4339
import Data.Typeable
4440
import GHC.IO.Handle.FD (openFileBlocking)
4541
import GHC.Stack
4642
import System.IO (IOMode (ReadMode), hClose)
47-
import qualified Text.Parsec as Parsec
48-
import qualified Text.Parsec.String as Parsec
49-
import qualified Text.ParserCombinators.Parsec.Error as Parsec
43+
import Text.Parsec qualified as Parsec
44+
import Text.Parsec.String qualified as Parsec
45+
import Text.ParserCombinators.Parsec.Error qualified as Parsec
5046

5147
(?!) :: Maybe a -> e -> Either e a
5248
Nothing ?! e = Left e
@@ -57,14 +53,15 @@ Left e ?!. f = Left (f e)
5753
Right x ?!. _ = Right x
5854

5955
infixl 4 <<$>>
56+
6057
(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)
6158
(<<$>>) = fmap . fmap
6259

6360
infixl 4 <<<$>>>
61+
6462
(<<<$>>>) :: (Functor f, Functor g, Functor h) => (a -> b) -> f (g (h a)) -> f (g (h b))
6563
(<<<$>>>) = fmap . fmap . fmap
6664

67-
6865
{-# NOINLINE noInlineMaybeToStrictMaybe #-}
6966
noInlineMaybeToStrictMaybe :: Maybe a -> StrictMaybe a
7067
noInlineMaybeToStrictMaybe Nothing = SNothing

cardano-api/test/cardano-api-test/Test/Cardano/Api/Envelope.hs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
{-# LANGUAGE CPP #-}
21
{-# LANGUAGE FlexibleContexts #-}
32

43
module Test.Cardano.Api.Envelope
54
( tests
65
)
76
where
87

9-
import Cardano.Api
8+
import Cardano.Api
109

11-
import Test.Gen.Cardano.Api.Typed
10+
import Test.Gen.Cardano.Api.Typed
1211

13-
import Test.Cardano.Api.Orphans ()
12+
import Test.Cardano.Api.Orphans ()
1413

15-
import Hedgehog (Property)
16-
import qualified Hedgehog as H
17-
import Test.Tasty (TestTree, testGroup)
18-
import Test.Tasty.Hedgehog (testProperty)
14+
import Hedgehog (Property)
15+
import Hedgehog qualified as H
16+
import Test.Tasty (TestTree, testGroup)
17+
import Test.Tasty.Hedgehog (testProperty)
1918

2019
{- HLINT ignore "Use camelCase" -}
2120

@@ -87,11 +86,7 @@ prop_roundtrip_VrfSigningKey_envelope =
8786

8887
roundtrip_VerificationKey_envelope
8988
:: ()
90-
#if MIN_VERSION_base(4,17,0)
91-
-- GHC 8.10 considers the HasTypeProxy constraint redundant but ghc-9.2 and above complains if its
92-
-- not present.
9389
=> HasTypeProxy keyrole
94-
#endif
9590
=> Key keyrole
9691
=> AsType keyrole
9792
-> Property

cardano-api/test/cardano-api-test/Test/Cardano/Api/RawBytes.hs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
{-# LANGUAGE CPP #-}
21
{-# LANGUAGE FlexibleContexts #-}
32

43
module Test.Cardano.Api.RawBytes
54
( tests
65
)
76
where
87

9-
import Cardano.Api
8+
import Cardano.Api
109

11-
import Test.Gen.Cardano.Api.Typed
10+
import Test.Gen.Cardano.Api.Typed
1211

13-
import Test.Cardano.Api.Orphans ()
12+
import Test.Cardano.Api.Orphans ()
1413

15-
import Hedgehog (Property)
16-
import qualified Hedgehog as H
17-
import Test.Tasty (TestTree, testGroup)
18-
import Test.Tasty.Hedgehog (testProperty)
14+
import Hedgehog (Property)
15+
import Hedgehog qualified as H
16+
import Test.Tasty (TestTree, testGroup)
17+
import Test.Tasty.Hedgehog (testProperty)
1918

2019
{- HLINT ignore "Use camelCase" -}
2120

@@ -88,10 +87,7 @@ roundtrip_raw_bytes _ g =
8887

8988
roundtrip_verification_key_hash_raw
9089
:: ()
91-
#if MIN_VERSION_base(4,17,0)
92-
-- GHC 9.2 and above needs an extra constraint.
9390
=> HasTypeProxy keyrole
94-
#endif
9591
=> Key keyrole
9692
=> Eq (Hash keyrole)
9793
=> Show (Hash keyrole)

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
flake = cabalProject.flake (
145145
lib.optionalAttrs (system == "x86_64-linux") {
146146
# on linux, build/test other supported compilers
147-
variants = lib.genAttrs ["ghc8107" crossCompilerVersion] (compiler-nix-name: {
147+
variants = lib.genAttrs [crossCompilerVersion] (compiler-nix-name: {
148148
inherit compiler-nix-name;
149149
});
150150
}

0 commit comments

Comments
 (0)