Skip to content

Commit 0e41e37

Browse files
author
Gaël Deest
authored
Merge pull request #1485 from haskell-servant/rename-proof
Rename proof to g{Client,Server,Link}Proof
2 parents 1bb0282 + f2bd982 commit 0e41e37

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

servant-client-core/src/Servant/Client/Core/HasClient.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -828,10 +828,10 @@ type GClientConstraints api m =
828828
)
829829

830830
class GClient (api :: * -> *) m where
831-
proof :: Dict (GClientConstraints api m)
831+
gClientProof :: Dict (GClientConstraints api m)
832832

833833
instance GClientConstraints api m => GClient api m where
834-
proof = Dict
834+
gClientProof = Dict
835835

836836
instance
837837
( forall n. GClient api n
@@ -843,7 +843,7 @@ instance
843843

844844
clientWithRoute :: Proxy m -> Proxy (NamedRoutes api) -> Request -> Client m (NamedRoutes api)
845845
clientWithRoute pm _ request =
846-
case proof @api @m of
846+
case gClientProof @api @m of
847847
Dict -> fromServant $ clientWithRoute pm (Proxy @(ToServantApi api)) request
848848

849849
hoistClientMonad
@@ -854,7 +854,7 @@ instance
854854
-> Client ma (NamedRoutes api)
855855
-> Client mb (NamedRoutes api)
856856
hoistClientMonad _ _ nat clientA =
857-
case (proof @api @ma, proof @api @mb) of
857+
case (gClientProof @api @ma, gClientProof @api @mb) of
858858
(Dict, Dict) ->
859859
fromServant @api @(AsClientT mb) $
860860
hoistClientMonad @m @(ToServantApi api) @ma @mb Proxy Proxy nat $

servant-server/src/Servant/Server/Internal.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -928,13 +928,13 @@ type GServerConstraints api m =
928928
-- is provided in this module for all record APIs.
929929

930930
class GServer (api :: * -> *) (m :: * -> *) where
931-
proof :: Dict (GServerConstraints api m)
931+
gServerProof :: Dict (GServerConstraints api m)
932932

933933
instance
934934
( ToServant api (AsServerT m) ~ ServerT (ToServantApi api) m
935935
, GServantProduct (Rep (api (AsServerT m)))
936936
) => GServer api m where
937-
proof = Dict
937+
gServerProof = Dict
938938

939939
instance
940940
( HasServer (ToServantApi api) context
@@ -950,7 +950,7 @@ instance
950950
-> Delayed env (api (AsServerT Handler))
951951
-> Router env
952952
route _ ctx delayed =
953-
case proof @api @Handler of
953+
case gServerProof @api @Handler of
954954
Dict -> route (Proxy @(ToServantApi api)) ctx (toServant <$> delayed)
955955

956956
hoistServerWithContext
@@ -960,7 +960,7 @@ instance
960960
-> api (AsServerT m)
961961
-> api (AsServerT n)
962962
hoistServerWithContext _ pctx nat server =
963-
case (proof @api @m, proof @api @n) of
963+
case (gServerProof @api @m, gServerProof @api @n) of
964964
(Dict, Dict) ->
965965
fromServant servantSrvN
966966
where

servant/src/Servant/Links.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,10 +595,10 @@ type GLinkConstraints routes a =
595595
)
596596

597597
class GLink (routes :: * -> *) (a :: *) where
598-
proof :: Dict (GLinkConstraints routes a)
598+
gLinkProof :: Dict (GLinkConstraints routes a)
599599

600600
instance GLinkConstraints routes a => GLink routes a where
601-
proof = Dict
601+
gLinkProof = Dict
602602

603603
instance
604604
( HasLink (ToServantApi routes)
@@ -613,7 +613,7 @@ instance
613613
-> Link
614614
-> routes (AsLink a)
615615

616-
toLink toA _ l = case proof @routes @a of
616+
toLink toA _ l = case gLinkProof @routes @a of
617617
Dict -> fromServant $ toLink toA (Proxy @(ToServantApi routes)) l
618618

619619
-- AuthProtext instances

0 commit comments

Comments
 (0)