Skip to content

Commit 67a9bf4

Browse files
committed
Use GHC2021
The goal was to use GHC2024, but that's only supported by `GHC >= 9.10`. Required extensions which are part of GHC2024 are added to `default-extensions`.
1 parent 0975966 commit 67a9bf4

File tree

44 files changed

+45
-360
lines changed

Some content is hidden

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

44 files changed

+45
-360
lines changed

typed-protocols-cborg/src/Network/TypedProtocol/Codec/CBOR.hs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE FlexibleContexts #-}
3-
{-# LANGUAGE LambdaCase #-}
4-
{-# LANGUAGE MonoLocalBinds #-}
5-
{-# LANGUAGE PolyKinds #-}
6-
{-# LANGUAGE RankNTypes #-}
7-
{-# LANGUAGE ScopedTypeVariables #-}
8-
91
module Network.TypedProtocol.Codec.CBOR
102
( module Network.TypedProtocol.Codec
113
, mkCodecCborLazyBS

typed-protocols-cborg/typed-protocols-cborg.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ library
2323
cborg >=0.2.1 && <0.3,
2424
singletons,
2525

26-
io-classes:io-classes ^>=1.7,
26+
io-classes ^>=1.7,
2727
typed-protocols ^>=0.4
28-
2928
hs-source-dirs: src
30-
default-language: Haskell2010
29+
default-language: GHC2021
30+
default-extensions: LambdaCase
3131
ghc-options: -Wall
3232
-Wno-unticked-promoted-constructors
3333
-Wcompat

typed-protocols-examples/src/Network/TypedProtocol/Channel.hs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
{-# LANGUAGE CPP #-}
2-
{-# LANGUAGE FlexibleContexts #-}
3-
{-# LANGUAGE NamedFieldPuns #-}
4-
{-# LANGUAGE RankNTypes #-}
5-
{-# LANGUAGE ScopedTypeVariables #-}
6-
{-# LANGUAGE TypeApplications #-}
1+
{-# LANGUAGE CPP #-}
72

83
module Network.TypedProtocol.Channel
94
( Channel (..)

typed-protocols-examples/src/Network/TypedProtocol/Driver/Simple.hs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
{-# LANGUAGE BangPatterns #-}
2-
{-# LANGUAGE DataKinds #-}
3-
{-# LANGUAGE FlexibleContexts #-}
4-
{-# LANGUAGE GADTs #-}
5-
{-# LANGUAGE NamedFieldPuns #-}
6-
{-# LANGUAGE PolyKinds #-}
7-
{-# LANGUAGE RankNTypes #-}
8-
{-# LANGUAGE ScopedTypeVariables #-}
91
{-# LANGUAGE TypeFamilies #-}
102
-- @UndecidableInstances@ extensions is required for defining @Show@ instance
113
-- of @'TraceSendRecv'@.

typed-protocols-examples/src/Network/TypedProtocol/PingPong/Client.hs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE GADTs #-}
3-
{-# LANGUAGE KindSignatures #-}
4-
{-# LANGUAGE ScopedTypeVariables #-}
5-
{-# LANGUAGE TypeOperators #-}
6-
71
module Network.TypedProtocol.PingPong.Client
82
( -- * Normal client
93
PingPongClient (..)

typed-protocols-examples/src/Network/TypedProtocol/PingPong/Codec.hs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE FlexibleContexts #-}
3-
{-# LANGUAGE GADTs #-}
4-
{-# LANGUAGE KindSignatures #-}
5-
{-# LANGUAGE NamedFieldPuns #-}
6-
{-# LANGUAGE ScopedTypeVariables #-}
7-
81
module Network.TypedProtocol.PingPong.Codec where
92

103
import Network.TypedProtocol.Codec

typed-protocols-examples/src/Network/TypedProtocol/PingPong/Codec/CBOR.hs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE FlexibleContexts #-}
3-
{-# LANGUAGE GADTs #-}
4-
{-# LANGUAGE KindSignatures #-}
5-
{-# LANGUAGE PolyKinds #-}
6-
{-# LANGUAGE ScopedTypeVariables #-}
7-
81
module Network.TypedProtocol.PingPong.Codec.CBOR where
92

103
import Control.Monad.Class.MonadST

typed-protocols-examples/src/Network/TypedProtocol/PingPong/Examples.hs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
{-# LANGUAGE BangPatterns #-}
2-
{-# LANGUAGE DataKinds #-}
3-
{-# LANGUAGE GADTs #-}
4-
{-# LANGUAGE PolyKinds #-}
5-
{-# LANGUAGE ScopedTypeVariables #-}
6-
{-# LANGUAGE TypeOperators #-}
7-
81
module Network.TypedProtocol.PingPong.Examples where
92

103
import Network.TypedProtocol.PingPong.Client

typed-protocols-examples/src/Network/TypedProtocol/PingPong/Server.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE GADTs #-}
31
{-# LANGUAGE RecordWildCards #-}
42

53
module Network.TypedProtocol.PingPong.Server where

typed-protocols-examples/src/Network/TypedProtocol/PingPong/Type.hs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE EmptyCase #-}
3-
{-# LANGUAGE FlexibleInstances #-}
4-
{-# LANGUAGE GADTs #-}
5-
{-# LANGUAGE StandaloneDeriving #-}
6-
{-# LANGUAGE TypeFamilies #-}
7-
1+
{-# LANGUAGE TypeFamilies #-}
82

93
module Network.TypedProtocol.PingPong.Type where
104

typed-protocols-examples/src/Network/TypedProtocol/ReqResp/Client.hs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE GADTs #-}
3-
{-# LANGUAGE PolyKinds #-}
4-
{-# LANGUAGE RankNTypes #-}
5-
{-# LANGUAGE ScopedTypeVariables #-}
6-
71
module Network.TypedProtocol.ReqResp.Client
82
( -- * Normal client
93
ReqRespClient (..)

typed-protocols-examples/src/Network/TypedProtocol/ReqResp/Codec.hs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE FlexibleContexts #-}
3-
{-# LANGUAGE GADTs #-}
4-
{-# LANGUAGE KindSignatures #-}
5-
{-# LANGUAGE NamedFieldPuns #-}
6-
{-# LANGUAGE PolyKinds #-}
7-
{-# LANGUAGE ScopedTypeVariables #-}
8-
91
module Network.TypedProtocol.ReqResp.Codec where
102

113
import Network.TypedProtocol.Codec

typed-protocols-examples/src/Network/TypedProtocol/ReqResp/Codec/CBOR.hs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE FlexibleContexts #-}
3-
{-# LANGUAGE GADTs #-}
4-
{-# LANGUAGE KindSignatures #-}
5-
{-# LANGUAGE PolyKinds #-}
6-
{-# LANGUAGE ScopedTypeVariables #-}
7-
81
module Network.TypedProtocol.ReqResp.Codec.CBOR where
92

103
import Control.Monad.Class.MonadST

typed-protocols-examples/src/Network/TypedProtocol/ReqResp/Examples.hs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
{-# LANGUAGE BangPatterns #-}
2-
{-# LANGUAGE DataKinds #-}
3-
{-# LANGUAGE GADTs #-}
4-
{-# LANGUAGE PolyKinds #-}
5-
{-# LANGUAGE ScopedTypeVariables #-}
6-
71
module Network.TypedProtocol.ReqResp.Examples where
82

93
import Network.TypedProtocol.ReqResp.Client

typed-protocols-examples/src/Network/TypedProtocol/ReqResp/Type.hs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE EmptyCase #-}
3-
{-# LANGUAGE FlexibleInstances #-}
4-
{-# LANGUAGE GADTs #-}
5-
{-# LANGUAGE PolyKinds #-}
6-
{-# LANGUAGE StandaloneDeriving #-}
7-
{-# LANGUAGE TypeFamilies #-}
8-
1+
{-# LANGUAGE TypeFamilies #-}
92

103
module Network.TypedProtocol.ReqResp.Type where
114

typed-protocols-examples/src/Network/TypedProtocol/ReqResp2/Client.hs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
{-# LANGUAGE BangPatterns #-}
2-
{-# LANGUAGE DataKinds #-}
3-
{-# LANGUAGE GADTs #-}
4-
{-# LANGUAGE PolyKinds #-}
5-
{-# LANGUAGE ScopedTypeVariables #-}
6-
{-# LANGUAGE TypeApplications #-}
7-
8-
9-
101
module Network.TypedProtocol.ReqResp2.Client where
112

123
import Network.TypedProtocol.ReqResp2.Type

typed-protocols-examples/src/Network/TypedProtocol/ReqResp2/Type.hs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE EmptyCase #-}
3-
{-# LANGUAGE FlexibleInstances #-}
4-
{-# LANGUAGE GADTs #-}
5-
{-# LANGUAGE PolyKinds #-}
6-
{-# LANGUAGE StandaloneDeriving #-}
71
{-# LANGUAGE TypeFamilies #-}
82

9-
103
module Network.TypedProtocol.ReqResp2.Type where
114

125
import Network.TypedProtocol.Core

typed-protocols-examples/src/Network/TypedProtocol/Stateful/ReqResp/Client.hs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE FlexibleContexts #-}
3-
{-# LANGUAGE GADTs #-}
4-
{-# LANGUAGE PolyKinds #-}
5-
{-# LANGUAGE RankNTypes #-}
6-
{-# LANGUAGE ScopedTypeVariables #-}
7-
81
module Network.TypedProtocol.Stateful.ReqResp.Client
92
( ReqRespClient (..)
103
, reqRespClientPeer

typed-protocols-examples/src/Network/TypedProtocol/Stateful/ReqResp/Codec.hs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE FlexibleContexts #-}
3-
{-# LANGUAGE GADTs #-}
4-
{-# LANGUAGE NamedFieldPuns #-}
5-
{-# LANGUAGE PolyKinds #-}
6-
{-# LANGUAGE RankNTypes #-}
7-
{-# LANGUAGE ScopedTypeVariables #-}
8-
{-# LANGUAGE TypeOperators #-}
9-
101
module Network.TypedProtocol.Stateful.ReqResp.Codec where
112

123
import Data.Kind (Type)

typed-protocols-examples/src/Network/TypedProtocol/Stateful/ReqResp/Examples.hs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE GADTs #-}
3-
{-# LANGUAGE NamedFieldPuns #-}
4-
{-# LANGUAGE PolyKinds #-}
5-
{-# LANGUAGE RankNTypes #-}
6-
{-# LANGUAGE ScopedTypeVariables #-}
7-
81
module Network.TypedProtocol.Stateful.ReqResp.Examples where
92

103
import Network.TypedProtocol.Stateful.ReqResp.Server

typed-protocols-examples/src/Network/TypedProtocol/Stateful/ReqResp/Server.hs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE FlexibleContexts #-}
3-
{-# LANGUAGE GADTs #-}
4-
{-# LANGUAGE LambdaCase #-}
5-
{-# LANGUAGE PolyKinds #-}
6-
{-# LANGUAGE RankNTypes #-}
7-
{-# LANGUAGE ScopedTypeVariables #-}
8-
91
module Network.TypedProtocol.Stateful.ReqResp.Server
102
( ReqRespServer (..)
113
, reqRespServerPeer

typed-protocols-examples/src/Network/TypedProtocol/Stateful/ReqResp/Type.hs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE FlexibleInstances #-}
3-
{-# LANGUAGE GADTs #-}
4-
{-# LANGUAGE PolyKinds #-}
5-
{-# LANGUAGE ScopedTypeVariables #-}
6-
{-# LANGUAGE StandaloneDeriving #-}
7-
{-# LANGUAGE StandaloneKindSignatures #-}
8-
{-# LANGUAGE TypeFamilies #-}
9-
1+
{-# LANGUAGE TypeFamilies #-}
102

113
-- | An RPC protocol which in which request type determines respond time.
124
-- Unlike in the `Network.TypedProtocol.ReqResp.Type` where `req` and `resp`

typed-protocols-examples/src/Network/TypedProtocol/Trans/Wedge.hs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE FlexibleContexts #-}
3-
{-# LANGUAGE FlexibleInstances #-}
4-
{-# LANGUAGE GADTs #-}
5-
{-# LANGUAGE InstanceSigs #-}
6-
{-# LANGUAGE KindSignatures #-}
7-
{-# LANGUAGE PolyKinds #-}
8-
{-# LANGUAGE ScopedTypeVariables #-}
9-
{-# LANGUAGE StandaloneDeriving #-}
10-
{-# LANGUAGE StandaloneKindSignatures #-}
11-
{-# LANGUAGE TypeApplications #-}
12-
{-# LANGUAGE TypeFamilies #-}
13-
{-# LANGUAGE TypeOperators #-}
14-
{-# LANGUAGE UndecidableInstances #-}
1+
{-# LANGUAGE TypeFamilies #-}
2+
{-# LANGUAGE UndecidableInstances #-}
153

164
module Network.TypedProtocol.Trans.Wedge where
175

typed-protocols-examples/test/Network/TypedProtocol/PingPong/Tests.hs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
{-# LANGUAGE CPP #-}
2-
{-# LANGUAGE DataKinds #-}
3-
{-# LANGUAGE FlexibleInstances #-}
4-
{-# LANGUAGE GADTs #-}
5-
{-# LANGUAGE NamedFieldPuns #-}
6-
1+
{-# LANGUAGE CPP #-}
72
-- orphaned arbitrary instances
83
{-# OPTIONS_GHC -Wno-orphans #-}
94

typed-protocols-examples/test/Network/TypedProtocol/ReqResp/Tests.hs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
{-# LANGUAGE CPP #-}
2-
{-# LANGUAGE DataKinds #-}
3-
{-# LANGUAGE FlexibleInstances #-}
4-
{-# LANGUAGE GADTs #-}
5-
{-# LANGUAGE NamedFieldPuns #-}
6-
{-# LANGUAGE PolyKinds #-}
7-
{-# LANGUAGE ScopedTypeVariables #-}
8-
{-# LANGUAGE TupleSections #-}
9-
1+
{-# LANGUAGE CPP #-}
102
-- orphaned arbitrary instances
113
{-# OPTIONS_GHC -Wno-orphans #-}
124

13-
145
module Network.TypedProtocol.ReqResp.Tests (tests) where
156

167
import Network.TypedProtocol.Channel

typed-protocols-examples/typed-protocols-examples.cabal

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@ library
4545
, Network.TypedProtocol.Stateful.ReqResp.Examples
4646

4747
, Network.TypedProtocol.Trans.Wedge
48-
other-extensions: GADTs
49-
, RankNTypes
50-
, PolyKinds
51-
, DataKinds
52-
, ScopedTypeVariables
53-
, TypeFamilies
54-
, TypeOperators
55-
, BangPatterns
5648
build-depends: base,
5749
bytestring,
5850
cborg,
@@ -64,9 +56,12 @@ library
6456
time,
6557
typed-protocols ^>= 0.4,
6658
typed-protocols-cborg,
67-
typed-protocols-stateful,
59+
typed-protocols-stateful
6860
hs-source-dirs: src
69-
default-language: Haskell2010
61+
default-language: GHC2021
62+
default-extensions: DataKinds
63+
GADTs
64+
LambdaCase
7065
-- ghc-9.2 pulls `ghc-heap-9.12` which is not compatible
7166
if impl(ghc < 9.4)
7267
build-depends: ghc-heap < 9.12
@@ -102,7 +97,9 @@ test-suite test
10297
, network
10398
, unix
10499

105-
default-language: Haskell2010
100+
default-language: GHC2021
101+
default-extensions: DataKinds
102+
GADTs
106103
ghc-options: -rtsopts
107104
-Wall
108105
-Wno-unticked-promoted-constructors

typed-protocols-stateful-cborg/src/Network/TypedProtocol/Stateful/Codec/CBOR.hs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE FlexibleContexts #-}
3-
{-# LANGUAGE MonoLocalBinds #-}
4-
{-# LANGUAGE PolyKinds #-}
5-
{-# LANGUAGE RankNTypes #-}
6-
{-# LANGUAGE ScopedTypeVariables #-}
7-
81
module Network.TypedProtocol.Stateful.Codec.CBOR
92
( module Network.TypedProtocol.Stateful.Codec
103
, DeserialiseFailure

typed-protocols-stateful-cborg/typed-protocols-stateful-cborg.cabal

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ library
3131
typed-protocols-stateful
3232

3333
hs-source-dirs: src
34-
default-language: Haskell2010
35-
default-extensions: ImportQualifiedPost
34+
default-language: GHC2021
3635
ghc-options: -Wall
3736
-Wno-unticked-promoted-constructors
3837
-Wcompat

typed-protocols-stateful/src/Network/TypedProtocol/Stateful/Codec.hs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE FlexibleContexts #-}
3-
{-# LANGUAGE FlexibleInstances #-}
4-
{-# LANGUAGE GADTs #-}
5-
{-# LANGUAGE NamedFieldPuns #-}
6-
{-# LANGUAGE PatternSynonyms #-}
7-
{-# LANGUAGE PolyKinds #-}
8-
{-# LANGUAGE QuantifiedConstraints #-}
9-
{-# LANGUAGE RankNTypes #-}
10-
{-# LANGUAGE ScopedTypeVariables #-}
11-
{-# LANGUAGE TypeFamilies #-}
12-
{-# LANGUAGE ViewPatterns #-}
1+
{-# LANGUAGE PatternSynonyms #-}
2+
{-# LANGUAGE QuantifiedConstraints #-}
3+
{-# LANGUAGE TypeFamilies #-}
4+
{-# LANGUAGE ViewPatterns #-}
135
-- @UndecidableInstances@ extension is required for defining @Show@ instance of
146
-- @'AnyMessage'@ and @'AnyMessage'@.
15-
{-# LANGUAGE UndecidableInstances #-}
7+
{-# LANGUAGE UndecidableInstances #-}
168
{-# OPTIONS_GHC -Wno-dodgy-imports #-}
179

1810
-- | Stateful codec. This module is intended to be imported qualified.

0 commit comments

Comments
 (0)