on master help sign in
Merge pull request #1592 from TeofilC/ghc-9.4
d5b9cbfMaxim Koltsov
.github/workflows/master.yml+1
@@ -20,6 +20,7 @@ jobs:
20 - "8.10.7"
20 - "8.10.7"
21 - "9.0.2"
21 - "9.0.2"
22 - "9.2.2"
22 - "9.2.2"
23+ - "9.4.2"
23
24
24 steps:
25 steps:
25 - uses: actions/checkout@v2
26 - uses: actions/checkout@v2
cabal.project+5
@@ -51,3 +51,8 @@ packages:
51tests: True
51tests: True
52optimization: False
52optimization: False
53-- reorder-goals: True
53-- reorder-goals: True
54+
55+allow-newer:
56+-- see https://github.com/haskellari/postgresql-simple/issues/104
57+ postgresql-simple:base
58+ , postgresql-simple:template-haskell
servant-auth/servant-auth-client/servant-auth-client.cabal+1−1
@@ -31,7 +31,7 @@ library
31 default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators
31 default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators
32 ghc-options: -Wall
32 ghc-options: -Wall
33 build-depends:
33 build-depends:
34− base >= 4.10 && < 4.17
34+ base >= 4.10 && < 4.18
35 , bytestring >= 0.10.6.0 && < 0.12
35 , bytestring >= 0.10.6.0 && < 0.12
36 , containers >= 0.5.6.2 && < 0.7
36 , containers >= 0.5.6.2 && < 0.7
37 , servant-auth == 0.4.*
37 , servant-auth == 0.4.*
servant-auth/servant-auth-docs/servant-auth-docs.cabal+2−2
@@ -35,7 +35,7 @@ library
35 default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators
35 default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators
36 ghc-options: -Wall
36 ghc-options: -Wall
37 build-depends:
37 build-depends:
38− base >= 4.10 && < 4.17
38+ base >= 4.10 && < 4.18
39 , servant-docs >= 0.11.2 && < 0.13
39 , servant-docs >= 0.11.2 && < 0.13
40 , servant >= 0.13 && < 0.20
40 , servant >= 0.13 && < 0.20
41 , servant-auth == 0.4.*
41 , servant-auth == 0.4.*
@@ -50,7 +50,7 @@ test-suite doctests
50 build-depends:
50 build-depends:
51 base,
51 base,
52 servant-auth-docs,
52 servant-auth-docs,
53− doctest >= 0.16 && < 0.19,
53+ doctest >= 0.16 && < 0.21,
54 QuickCheck >= 2.11.3 && < 2.15,
54 QuickCheck >= 2.11.3 && < 2.15,
55 template-haskell
55 template-haskell
56 ghc-options: -Wall -threaded
56 ghc-options: -Wall -threaded
servant-auth/servant-auth-server/servant-auth-server.cabal+3−3
@@ -31,7 +31,7 @@ library
31 default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators
31 default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators
32 ghc-options: -Wall
32 ghc-options: -Wall
33 build-depends:
33 build-depends:
34− base >= 4.10 && < 4.17
34+ base >= 4.10 && < 4.18
35 , aeson >= 1.0.0.1 && < 3
35 , aeson >= 1.0.0.1 && < 3
36 , base64-bytestring >= 1.0.0.1 && < 2
36 , base64-bytestring >= 1.0.0.1 && < 2
37 , blaze-builder >= 0.4.1.0 && < 0.5
37 , blaze-builder >= 0.4.1.0 && < 0.5
@@ -43,7 +43,7 @@ library
43 , http-types >= 0.12.2 && < 0.13
43 , http-types >= 0.12.2 && < 0.13
44 , jose >= 0.7.0.0 && < 0.10
44 , jose >= 0.7.0.0 && < 0.10
45 , lens >= 4.16.1 && < 5.3
45 , lens >= 4.16.1 && < 5.3
46− , memory >= 0.14.16 && < 0.18
46+ , memory >= 0.14.16 && < 0.19
47 , monad-time >= 0.3.1.0 && < 0.4
47 , monad-time >= 0.3.1.0 && < 0.4
48 , mtl >= 2.2.2 && < 2.3
48 , mtl >= 2.2.2 && < 2.3
49 , servant >= 0.13 && < 0.20
49 , servant >= 0.13 && < 0.20
@@ -51,7 +51,7 @@ library
51 , servant-server >= 0.13 && < 0.20
51 , servant-server >= 0.13 && < 0.20
52 , tagged >= 0.8.4 && < 0.9
52 , tagged >= 0.8.4 && < 0.9
53 , text >= 1.2.3.0 && < 2.1
53 , text >= 1.2.3.0 && < 2.1
54− , time >= 1.5.0.1 && < 1.12
54+ , time >= 1.5.0.1 && < 1.13
55 , unordered-containers >= 0.2.9.0 && < 0.3
55 , unordered-containers >= 0.2.9.0 && < 0.3
56 , wai >= 3.2.1.2 && < 3.3
56 , wai >= 3.2.1.2 && < 3.3
57
57
servant-auth/servant-auth-swagger/servant-auth-swagger.cabal+1−1
@@ -31,7 +31,7 @@ library
31 default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators
31 default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators
32 ghc-options: -Wall
32 ghc-options: -Wall
33 build-depends:
33 build-depends:
34− base >= 4.10 && < 4.17
34+ base >= 4.10 && < 4.18
35 , text >= 1.2.3.0 && < 2.1
35 , text >= 1.2.3.0 && < 2.1
36 , servant-swagger >= 1.1.5 && < 2
36 , servant-swagger >= 1.1.5 && < 2
37 , swagger2 >= 2.2.2 && < 3
37 , swagger2 >= 2.2.2 && < 3
servant-auth/servant-auth/servant-auth.cabal+1−1
@@ -33,7 +33,7 @@ library
33 default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators
33 default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators
34 ghc-options: -Wall
34 ghc-options: -Wall
35 build-depends:
35 build-depends:
36− base >= 4.10 && < 4.17
36+ base >= 4.10 && < 4.18
37 , containers >= 0.6 && < 0.7
37 , containers >= 0.6 && < 0.7
38 , aeson >= 1.3.1.1 && < 3
38 , aeson >= 1.3.1.1 && < 3
39 , jose >= 0.7.0.0 && < 0.10
39 , jose >= 0.7.0.0 && < 0.10
servant-client-core/servant-client-core.cabal+2−2
@@ -50,14 +50,14 @@ library
50 --
50 --
51 -- note: mtl lower bound is so low because of GHC-7.8
51 -- note: mtl lower bound is so low because of GHC-7.8
52 build-depends:
52 build-depends:
53− base >= 4.9 && < 4.17
53+ base >= 4.9 && < 4.18
54 , bytestring >= 0.10.8.1 && < 0.12
54 , bytestring >= 0.10.8.1 && < 0.12
55 , constraints >= 0.2 && < 0.14
55 , constraints >= 0.2 && < 0.14
56 , containers >= 0.5.7.1 && < 0.7
56 , containers >= 0.5.7.1 && < 0.7
57 , deepseq >= 1.4.2.0 && < 1.5
57 , deepseq >= 1.4.2.0 && < 1.5
58 , text >= 1.2.3.0 && < 2.1
58 , text >= 1.2.3.0 && < 2.1
59 , transformers >= 0.5.2.0 && < 0.6
59 , transformers >= 0.5.2.0 && < 0.6
60− , template-haskell >= 2.11.1.0 && < 2.19
60+ , template-haskell >= 2.11.1.0 && < 2.20
61
61
62 if !impl(ghc >= 8.2)
62 if !impl(ghc >= 8.2)
63 build-depends:
63 build-depends:
servant-client/servant-client.cabal+2−2
@@ -41,14 +41,14 @@ library
41 -- Bundled with GHC: Lower bound to not force re-installs
41 -- Bundled with GHC: Lower bound to not force re-installs
42 -- text and mtl are bundled starting with GHC-8.4
42 -- text and mtl are bundled starting with GHC-8.4
43 build-depends:
43 build-depends:
44− base >= 4.9 && < 4.17
44+ base >= 4.9 && < 4.18
45 , bytestring >= 0.10.8.1 && < 0.12
45 , bytestring >= 0.10.8.1 && < 0.12
46 , containers >= 0.5.7.1 && < 0.7
46 , containers >= 0.5.7.1 && < 0.7
47 , deepseq >= 1.4.2.0 && < 1.5
47 , deepseq >= 1.4.2.0 && < 1.5
48 , mtl >= 2.2.2 && < 2.3
48 , mtl >= 2.2.2 && < 2.3
49 , stm >= 2.4.5.1 && < 2.6
49 , stm >= 2.4.5.1 && < 2.6
50 , text >= 1.2.3.0 && < 2.1
50 , text >= 1.2.3.0 && < 2.1
51− , time >= 1.6.0.1 && < 1.12
51+ , time >= 1.6.0.1 && < 1.13
52 , transformers >= 0.5.2.0 && < 0.6
52 , transformers >= 0.5.2.0 && < 0.6
53
53
54 if !impl(ghc >= 8.2)
54 if !impl(ghc >= 8.2)
servant-docs/servant-docs.cabal+1−1
@@ -41,7 +41,7 @@ library
41 --
41 --
42 -- note: mtl lower bound is so low because of GHC-7.8
42 -- note: mtl lower bound is so low because of GHC-7.8
43 build-depends:
43 build-depends:
44− base >= 4.9 && < 4.17
44+ base >= 4.9 && < 4.18
45 , bytestring >= 0.10.8.1 && < 0.12
45 , bytestring >= 0.10.8.1 && < 0.12
46 , text >= 1.2.3.0 && < 2.1
46 , text >= 1.2.3.0 && < 2.1
47
47
servant-foreign/servant-foreign.cabal+1−1
@@ -41,7 +41,7 @@ library
41 --
41 --
42 -- note: mtl lower bound is so low because of GHC-7.8
42 -- note: mtl lower bound is so low because of GHC-7.8
43 build-depends:
43 build-depends:
44− base >= 4.9 && < 4.17
44+ base >= 4.9 && < 4.18
45 , text >= 1.2.3.0 && < 2.1
45 , text >= 1.2.3.0 && < 2.1
46
46
47 -- Servant dependencies
47 -- Servant dependencies
servant-http-streams/servant-http-streams.cabal+2−2
@@ -38,13 +38,13 @@ library
38 -- Bundled with GHC: Lower bound to not force re-installs
38 -- Bundled with GHC: Lower bound to not force re-installs
39 -- text and mtl are bundled starting with GHC-8.4
39 -- text and mtl are bundled starting with GHC-8.4
40 build-depends:
40 build-depends:
41− base >= 4.9 && < 4.17
41+ base >= 4.9 && < 4.18
42 , bytestring >= 0.10.8.1 && < 0.12
42 , bytestring >= 0.10.8.1 && < 0.12
43 , containers >= 0.5.7.1 && < 0.7
43 , containers >= 0.5.7.1 && < 0.7
44 , deepseq >= 1.4.2.0 && < 1.5
44 , deepseq >= 1.4.2.0 && < 1.5
45 , mtl >= 2.2.2 && < 2.3
45 , mtl >= 2.2.2 && < 2.3
46 , text >= 1.2.3.0 && < 2.1
46 , text >= 1.2.3.0 && < 2.1
47− , time >= 1.6.0.1 && < 1.12
47+ , time >= 1.6.0.1 && < 1.13
48 , transformers >= 0.5.2.0 && < 0.6
48 , transformers >= 0.5.2.0 && < 0.6
49
49
50 if !impl(ghc >= 8.2)
50 if !impl(ghc >= 8.2)
servant-server/servant-server.cabal+2−2
@@ -60,7 +60,7 @@ library
60 -- Bundled with GHC: Lower bound to not force re-installs
60 -- Bundled with GHC: Lower bound to not force re-installs
61 -- text and mtl are bundled starting with GHC-8.4
61 -- text and mtl are bundled starting with GHC-8.4
62 build-depends:
62 build-depends:
63− base >= 4.9 && < 4.17
63+ base >= 4.9 && < 4.18
64 , bytestring >= 0.10.8.1 && < 0.12
64 , bytestring >= 0.10.8.1 && < 0.12
65 , constraints >= 0.2 && < 0.14
65 , constraints >= 0.2 && < 0.14
66 , containers >= 0.5.7.1 && < 0.7
66 , containers >= 0.5.7.1 && < 0.7
@@ -73,7 +73,7 @@ library
73 -- strict dependency as we re-export 'servant' things.
73 -- strict dependency as we re-export 'servant' things.
74 build-depends:
74 build-depends:
75 servant >= 0.19 && < 0.20
75 servant >= 0.19 && < 0.20
76− , http-api-data >= 0.4.1 && < 0.4.4
76+ , http-api-data >= 0.4.1 && < 0.5.1
77
77
78 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
78 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
79 -- Here can be exceptions if we really need features from the newer versions.
79 -- Here can be exceptions if we really need features from the newer versions.
servant-server/src/Servant/Server/Internal.hs+13−2
@@ -1,5 +1,6 @@
1{-# LANGUAGE AllowAmbiguousTypes #-}
1{-# LANGUAGE AllowAmbiguousTypes #-}
2{-# LANGUAGE ConstraintKinds #-}
2{-# LANGUAGE ConstraintKinds #-}
3+{-# LANGUAGE CPP #-}
3{-# LANGUAGE DataKinds #-}
4{-# LANGUAGE DataKinds #-}
4{-# LANGUAGE DeriveDataTypeable #-}
5{-# LANGUAGE DeriveDataTypeable #-}
5{-# LANGUAGE FlexibleContexts #-}
6{-# LANGUAGE FlexibleContexts #-}
@@ -94,6 +95,8 @@ import Servant.API.TypeErrors
94import Web.HttpApiData
95import Web.HttpApiData
95 (FromHttpApiData, parseHeader, parseQueryParam, parseUrlPiece,
96 (FromHttpApiData, parseHeader, parseQueryParam, parseUrlPiece,
96 parseUrlPieces)
97 parseUrlPieces)
98+import Data.Kind
99+ (Type)
97
100
98import Servant.Server.Internal.BasicAuth
101import Servant.Server.Internal.BasicAuth
99import Servant.Server.Internal.Context
102import Servant.Server.Internal.Context
@@ -821,7 +824,11 @@ instance (HasContextEntry context (NamedContext name subContext), HasServer subA
821-------------------------------------------------------------------------------
824-------------------------------------------------------------------------------
822
825
823-- Erroring instance for 'HasServer' when a combinator is not fully applied
826-- Erroring instance for 'HasServer' when a combinator is not fully applied
827+instance TypeError (PartialApplication
828+#if __GLASGOW_HASKELL__ >= 904
829+ @(Type -> [Type] -> Constraint)
830+#endif
824−instance TypeError (PartialApplication HasServer arr) => HasServer ((arr :: a -> b) :> sub) context
831+ HasServer arr) => HasServer ((arr :: a -> b) :> sub) context
825 where
832 where
826 type ServerT (arr :> sub) _ = TypeError (PartialApplication (HasServer :: * -> [*] -> Constraint) arr)
833 type ServerT (arr :> sub) _ = TypeError (PartialApplication (HasServer :: * -> [*] -> Constraint) arr)
827 route = error "unreachable"
834 route = error "unreachable"
@@ -865,7 +872,11 @@ type HasServerArrowTypeError a b =
865-- XXX: This omits the @context@ parameter, e.g.:
872-- XXX: This omits the @context@ parameter, e.g.:
866--
873--
867-- "There is no instance for HasServer (Bool :> …)". Do we care ?
874-- "There is no instance for HasServer (Bool :> …)". Do we care ?
868−instance {-# OVERLAPPABLE #-} TypeError (NoInstanceForSub HasServer ty) => HasServer (ty :> sub) context
875+instance {-# OVERLAPPABLE #-} TypeError (NoInstanceForSub
876+#if __GLASGOW_HASKELL__ >= 904
877+ @(Type -> [Type] -> Constraint)
878+#endif
879+ HasServer ty) => HasServer (ty :> sub) context
869
880
870instance {-# OVERLAPPABLE #-} TypeError (NoInstanceFor (HasServer api context)) => HasServer api context
881instance {-# OVERLAPPABLE #-} TypeError (NoInstanceFor (HasServer api context)) => HasServer api context
871
882
servant/servant.cabal+2−2
@@ -80,7 +80,7 @@ library
80 --
80 --
81 -- note: mtl lower bound is so low because of GHC-7.8
81 -- note: mtl lower bound is so low because of GHC-7.8
82 build-depends:
82 build-depends:
83− base >= 4.9 && < 4.17
83+ base >= 4.9 && < 4.18
84 , bytestring >= 0.10.8.1 && < 0.12
84 , bytestring >= 0.10.8.1 && < 0.12
85 , constraints >= 0.2
85 , constraints >= 0.2
86 , mtl >= 2.2.2 && < 2.3
86 , mtl >= 2.2.2 && < 2.3
@@ -92,7 +92,7 @@ library
92 -- We depend (heavily) on the API of these packages:
92 -- We depend (heavily) on the API of these packages:
93 -- i.e. re-export, or allow using without direct dependency
93 -- i.e. re-export, or allow using without direct dependency
94 build-depends:
94 build-depends:
95− http-api-data >= 0.4.1 && < 0.4.4
95+ http-api-data >= 0.4.1 && < 0.5.1
96 , singleton-bool >= 0.1.4 && < 0.1.7
96 , singleton-bool >= 0.1.4 && < 0.1.7
97
97
98 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
98 -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
servant/src/Servant/API/TypeLevel.hs+3−3
@@ -110,7 +110,7 @@ type family IsElem' a s :: Constraint
110--
110--
111-- >>> ok (Proxy :: Proxy (IsElem ("bye" :> Get '[JSON] Int) SampleAPI))
111-- >>> ok (Proxy :: Proxy (IsElem ("bye" :> Get '[JSON] Int) SampleAPI))
112-- ...
112-- ...
113−-- ... Could not deduce...
113+-- ... Could not ...
114-- ...
114-- ...
115--
115--
116-- An endpoint is considered within an api even if it is missing combinators
116-- An endpoint is considered within an api even if it is missing combinators
@@ -151,7 +151,7 @@ type family IsElem endpoint api :: Constraint where
151--
151--
152-- >>> ok (Proxy :: Proxy (IsSubAPI (SampleAPI :<|> Get '[JSON] Int) SampleAPI))
152-- >>> ok (Proxy :: Proxy (IsSubAPI (SampleAPI :<|> Get '[JSON] Int) SampleAPI))
153-- ...
153-- ...
154−-- ... Could not deduce...
154+-- ... Could not ...
155-- ...
155-- ...
156--
156--
157-- This uses @IsElem@ for checking; thus the note there applies here.
157-- This uses @IsElem@ for checking; thus the note there applies here.
@@ -174,7 +174,7 @@ type family AllIsElem xs api :: Constraint where
174--
174--
175-- >>> ok (Proxy :: Proxy (IsIn (Get '[JSON] Int) (Header "h" Bool :> Get '[JSON] Int)))
175-- >>> ok (Proxy :: Proxy (IsIn (Get '[JSON] Int) (Header "h" Bool :> Get '[JSON] Int)))
176-- ...
176-- ...
177−-- ... Could not deduce...
177+-- ... Could not ...
178-- ...
178-- ...
179type family IsIn (endpoint :: *) (api :: *) :: Constraint where
179type family IsIn (endpoint :: *) (api :: *) :: Constraint where
180 IsIn e (sa :<|> sb) = Or (IsIn e sa) (IsIn e sb)
180 IsIn e (sa :<|> sb) = Or (IsIn e sa) (IsIn e sb)
servant/src/Servant/Links.hs+14−3
@@ -1,5 +1,6 @@
1{-# LANGUAGE AllowAmbiguousTypes #-}
1{-# LANGUAGE AllowAmbiguousTypes #-}
2{-# LANGUAGE ConstraintKinds #-}
2{-# LANGUAGE ConstraintKinds #-}
3+{-# LANGUAGE CPP #-}
3{-# LANGUAGE DataKinds #-}
4{-# LANGUAGE DataKinds #-}
4{-# LANGUAGE FlexibleContexts #-}
5{-# LANGUAGE FlexibleContexts #-}
5{-# LANGUAGE FlexibleInstances #-}
6{-# LANGUAGE FlexibleInstances #-}
@@ -91,7 +92,7 @@
91-- >>> let bad_link = Proxy :: Proxy ("hello" :> Delete '[JSON] NoContent)
92-- >>> let bad_link = Proxy :: Proxy ("hello" :> Delete '[JSON] NoContent)
92-- >>> safeLink api bad_link
93-- >>> safeLink api bad_link
93-- ...
94-- ...
94−-- ...Could not deduce...
95+-- ...Could not ...
95-- ...
96-- ...
96--
97--
97-- This error is essentially saying that the type family couldn't find
98-- This error is essentially saying that the type family couldn't find
@@ -193,6 +194,8 @@ import Servant.API.Verbs
193import Servant.API.WithNamedContext
194import Servant.API.WithNamedContext
194 (WithNamedContext)
195 (WithNamedContext)
195import Web.HttpApiData
196import Web.HttpApiData
197+import Data.Kind
198+ (Type)
196
199
197-- | A safe link datatype.
200-- | A safe link datatype.
198-- The only way of constructing a 'Link' is using 'safeLink', which means any
201-- The only way of constructing a 'Link' is using 'safeLink', which means any
@@ -647,12 +650,20 @@ simpleToLink _ toA _ = toLink toA (Proxy :: Proxy sub)
647-- >>> import Data.Text (Text)
650-- >>> import Data.Text (Text)
648
651
649-- Erroring instance for 'HasLink' when a combinator is not fully applied
652-- Erroring instance for 'HasLink' when a combinator is not fully applied
650−instance TypeError (PartialApplication HasLink arr) => HasLink ((arr :: a -> b) :> sub)
653+instance TypeError (PartialApplication
654+#if __GLASGOW_HASKELL__ >= 904
655+ @(Type -> Constraint)
656+#endif
657+ HasLink arr) => HasLink ((arr :: a -> b) :> sub)
651 where
658 where
652 type MkLink (arr :> sub) _ = TypeError (PartialApplication (HasLink :: * -> Constraint) arr)
659 type MkLink (arr :> sub) _ = TypeError (PartialApplication (HasLink :: * -> Constraint) arr)
653 toLink = error "unreachable"
660 toLink = error "unreachable"
654
661
655-- Erroring instances for 'HasLink' for unknown API combinators
662-- Erroring instances for 'HasLink' for unknown API combinators
656−instance {-# OVERLAPPABLE #-} TypeError (NoInstanceForSub HasLink ty) => HasLink (ty :> sub)
663+instance {-# OVERLAPPABLE #-} TypeError (NoInstanceForSub
664+#if __GLASGOW_HASKELL__ >= 904
665+ @(Type -> Constraint)
666+#endif
667+ HasLink ty) => HasLink (ty :> sub)
657
668
658instance {-# OVERLAPPABLE #-} TypeError (NoInstanceFor (HasLink api)) => HasLink api
669instance {-# OVERLAPPABLE #-} TypeError (NoInstanceFor (HasLink api)) => HasLink api