@@ -1,16 +1,21 @@
1{-# OPTIONS_GHC -fno-warn-orphans #-}
1{-# OPTIONS_GHC -fno-warn-orphans #-}
2{-# LANGUAGE ConstraintKinds #-}
2{-# LANGUAGE ConstraintKinds #-}
3{-# LANGUAGE FlexibleContexts #-}
4{-# LANGUAGE FlexibleContexts #-}
4{-# LANGUAGE FlexibleInstances #-}
5{-# LANGUAGE FlexibleInstances #-}
5{-# LANGUAGE InstanceSigs #-}
6{-# LANGUAGE InstanceSigs #-}
6{-# LANGUAGE KindSignatures #-}
7{-# LANGUAGE KindSignatures #-}
7{-# LANGUAGE MultiParamTypeClasses #-}
8{-# LANGUAGE MultiParamTypeClasses #-}
8−{-# LANGUAGE QuantifiedConstraints #-}
9{-# LANGUAGE RankNTypes #-}
9{-# LANGUAGE RankNTypes #-}
10{-# LANGUAGE ScopedTypeVariables #-}
10{-# LANGUAGE ScopedTypeVariables #-}
11{-# LANGUAGE TypeApplications #-}
11{-# LANGUAGE TypeApplications #-}
12{-# LANGUAGE TypeFamilies #-}
12{-# LANGUAGE TypeFamilies #-}
13{-# LANGUAGE UndecidableInstances #-}
13{-# LANGUAGE UndecidableInstances #-}
15+#if __GLASGOW_HASKELL__ >= 806
16+{-# LANGUAGE QuantifiedConstraints #-}
14module Servant.Client.Generic (
19module Servant.Client.Generic (
15 AsClientT,
20 AsClientT,
16 genericClient,
21 genericClient,
@@ -58,6 +63,8 @@ genericClientHoist nt
58 m = Proxy :: Proxy m
63 m = Proxy :: Proxy m
59 api = Proxy :: Proxy (ToServantApi routes)
64 api = Proxy :: Proxy (ToServantApi routes)
66+#if __GLASGOW_HASKELL__ >= 806
61type GClientConstraints api m =
68type GClientConstraints api m =
62 ( GenericServant api (AsClientT m)
69 ( GenericServant api (AsClientT m)
63 , Client m (ToServantApi api) ~ ToServant api (AsClientT m)
70 , Client m (ToServantApi api) ~ ToServant api (AsClientT m)
@@ -95,3 +102,5 @@ instance
95 fromServant @api @(AsClientT mb) $
102 fromServant @api @(AsClientT mb) $
96 hoistClientMonad @m @(ToServantApi api) @ma @mb Proxy Proxy nat $
103 hoistClientMonad @m @(ToServantApi api) @ma @mb Proxy Proxy nat $
97 toServant @api @(AsClientT ma) clientA
104 toServant @api @(AsClientT ma) clientA