@@ -68,6 +68,7 @@ import Network.HTTP.Media.MediaType
6868import Network.HTTP.Media (mapContentMedia )
6969import WebApi.Util
7070import 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
8384data 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
8990instance ( 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
102103instance ( Accept ctype
@@ -202,7 +203,7 @@ instance Decode HTML Html where
202203html :: ByteString -> Html
203204html = 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
213214instance 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
219220instance (PartDecodings ts , Decodings ctypes (StripContent t ), MkContent t ~ Content ctypes a ) => PartDecodings (t ': ts ) where
0 commit comments