Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHC 9.6 and latest stack LTS compatibility #32

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions servant-mock.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ library
exposed-modules:
Servant.Mock
build-depends:
base >=4.9 && <4.14,
base-compat >=0.10.5 && <0.12,
bytestring >=0.10.8.1 && <0.11,
base >=4.9 && <4.19,
base-compat >=0.10.5 && <0.14,
bytestring >=0.10.8.1 && <0.13,
http-types >=0.12.2 && <0.13,
servant >=0.17 && <0.19,
servant-server >=0.17 && <0.19,
transformers >=0.5.2.0 && <0.6,
QuickCheck >=2.12.6.1 && <2.14,
servant >=0.17 && <0.21,
servant-server >=0.17 && <0.21,
transformers >=0.5.2.0 && <0.7,
QuickCheck >=2.12.6.1 && <2.15,
wai >=3.2.1.2 && <3.3
hs-source-dirs: src
default-language: Haskell2010
Expand Down
5 changes: 3 additions & 2 deletions src/Servant/Mock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import Prelude.Compat
import Control.Monad.IO.Class
import Data.ByteString.Lazy.Char8 (pack)
import Data.Proxy
import Data.Typeable
import GHC.TypeLits
import Network.HTTP.Types.Status
import Network.Wai
Expand Down Expand Up @@ -118,10 +119,10 @@ instance (HasMock a context, HasMock b context) => HasMock (a :<|> b) context wh
instance (KnownSymbol path, HasMock rest context) => HasMock (path :> rest) context where
mock _ = mock (Proxy :: Proxy rest)

instance (KnownSymbol s, FromHttpApiData a, HasMock rest context, SBoolI (FoldLenient mods)) => HasMock (Capture' mods s a :> rest) context where
instance (KnownSymbol s, FromHttpApiData a, HasMock rest context, SBoolI (FoldLenient mods), Typeable a) => HasMock (Capture' mods s a :> rest) context where
mock _ context = \_ -> mock (Proxy :: Proxy rest) context

instance (KnownSymbol s, FromHttpApiData a, HasMock rest context) => HasMock (CaptureAll s a :> rest) context where
instance (KnownSymbol s, FromHttpApiData a, HasMock rest context, Typeable a) => HasMock (CaptureAll s a :> rest) context where
mock _ context = \_ -> mock (Proxy :: Proxy rest) context

instance (AllCTUnrender ctypes a, HasMock rest context, SBoolI (FoldLenient mods))
Expand Down