Skip to content

Commit 46a0658

Browse files
committed
make it work with ghc 9.6
1 parent 9c16ec7 commit 46a0658

4 files changed

Lines changed: 15 additions & 13 deletions

File tree

webapi-contract/src/WebApi/ContentTypes.hs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ import Network.HTTP.Media.MediaType
6868
import Network.HTTP.Media (mapContentMedia)
6969
import WebApi.Util
7070
import Data.ByteString.Builder (lazyByteString, Builder)
71+
import Data.Kind ( Type )
7172

7273

7374
-- | Type representing content type of @text/html@.
@@ -83,7 +84,7 @@ data MultipartFormData
8384
data UrlEncoded
8485

8586
-- | Encodings of type for all content types `ctypes`.
86-
class Encodings (ctypes :: [*]) a where
87+
class Encodings (ctypes :: [Type]) a where
8788
encodings :: Proxy ctypes -> a -> [(MediaType, Builder)]
8889

8990
instance ( Accept ctype
@@ -96,7 +97,7 @@ instance Encodings '[] a where
9697
encodings _ _ = []
9798

9899
-- | Decodings of type for all content types `ctypes`.
99-
class Decodings (ctypes :: [*]) a where
100+
class Decodings (ctypes :: [Type]) a where
100101
decodings :: Proxy ctypes -> ByteString -> [(MediaType, Either String a)]
101102

102103
instance ( Accept ctype
@@ -202,7 +203,7 @@ instance Decode HTML Html where
202203
html :: ByteString -> Html
203204
html = Html
204205

205-
class PartEncodings (xs :: [*]) where
206+
class PartEncodings (xs :: [Type]) where
206207
partEncodings :: Proxy xs
207208
-> HListToRecTuple (StripContents xs)
208209
-> [[(MediaType, Builder)]]
@@ -213,7 +214,7 @@ instance (PartEncodings ts, Encodings ctypes (StripContent t), MkContent t ~ Con
213214
instance PartEncodings '[] where
214215
partEncodings _ () = []
215216

216-
class PartDecodings (xs :: [*]) where
217+
class PartDecodings (xs :: [Type]) where
217218
partDecodings :: Proxy xs -> [(SB.ByteString, ByteString)] -> Either String (HListToRecTuple (StripContents xs))
218219

219220
instance (PartDecodings ts, Decodings ctypes (StripContent t), MkContent t ~ Content ctypes a) => PartDecodings (t ': ts) where

webapi-contract/src/WebApi/Method.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import Data.ByteString.Char8 (pack)
3232
import Data.Proxy
3333
import GHC.TypeLits
3434
import Network.HTTP.Types
35+
import Data.Kind ( Type )
3536

3637
-- | Type representing a GET method.
3738
data GET
@@ -55,7 +56,7 @@ data CONNECT
5556
data CUSTOM (m :: Symbol)
5657

5758
-- | Singleton class for method types.
58-
class SingMethod (meth :: *) where
59+
class SingMethod (meth :: Type) where
5960
singMethod :: Proxy meth -> Method
6061

6162
instance SingMethod GET where

webapi-contract/webapi-contract.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ source-repository head
2222

2323
common lib-common
2424
build-depends: base >= 4.7 && < 5
25-
, text >= 1.2 && < 2
25+
, text >= 1.2 && < 2.2
2626
, bytestring >= 0.10.6.0 && < 0.12
2727
, http-types >= 0.8.6 && < 0.13
28-
, aeson >= 0.9 && < 2.2
28+
, aeson >= 0.9 && < 2.4
2929
, http-media >= 0.6 && < 0.9
30-
, time >= 1.5 && < 1.12
30+
, time >= 1.5 && < 1.13
3131
, bytestring-lexing == 0.5.*
3232
, bytestring-trie == 0.2.*
3333
, case-insensitive == 1.2.*

webapi/webapi.cabal

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ library
3232

3333
-- other-extensions:
3434
build-depends: base >= 4.7 && < 5
35-
, aeson >= 0.9 && < 2.2
35+
, aeson >= 0.9 && < 2.4
3636
, bytestring >= 0.10.6.0 && < 0.12
37-
, text >= 1.2 && < 2
38-
, time >= 1.5 && < 1.12
37+
, text >= 1.2 && < 2.2
38+
, time >= 1.5 && < 1.13
3939
, wai-extra >= 3.0 && < 3.3
4040
, http-types >= 0.8 && < 0.13
4141
, http-media >= 0.6 && < 0.9
@@ -77,10 +77,10 @@ test-suite unit-tests
7777
, http-types >= 0.8 && < 0.13
7878
, hspec >= 2.1 && < 2.8
7979
, hspec-wai >= 0.6 && < 0.11
80-
, text >= 1.2 && < 1.3
80+
, text >= 1.2 && < 2.2
8181
, bytestring >= 0.10.6.0 && < 0.11
8282
, vector >= 0.10 && < 0.13
83-
, time >= 1.5 && < 1.10
83+
, time >= 1.5 && < 1.13
8484
, QuickCheck >= 2.8 && < 2.15
8585
, binary == 0.8.*
8686
, webapi

0 commit comments

Comments
 (0)