on master help sign in
Merge pull request #1485 from haskell-servant/rename-proof

Rename proof to g{Client,Server,Link}Proof

commit0e41e37c938ca744d789912262e3a0fd80823101 authorGaël Deest <gael.deest@tweag.io> dateThu 18 Nov 2021, 10:43 (5 years ago) parent1bb0282f2bd982
3 files changed+11−11
servant-client-core/src/Servant/Client/Core/HasClient.hs+4−4 servant-server/src/Servant/Server/Internal.hs+4−4 servant/src/Servant/Links.hs+3−3
servant-client-core/src/Servant/Client/Core/HasClient.hs+4−4
@@ -828,10 +828,10 @@ type GClientConstraints api m =
828828 )
829829
830830class GClient (api :: * -> *) m where
831− proof :: Dict (GClientConstraints api m)
831+ gClientProof :: Dict (GClientConstraints api m)
832832
833833instance GClientConstraints api m => GClient api m where
834− proof = Dict
834+ gClientProof = Dict
835835
836836instance
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+4−4
@@ -928,13 +928,13 @@ type GServerConstraints api m =
928928-- is provided in this module for all record APIs.
929929
930930class GServer (api :: * -> *) (m :: * -> *) where
931− proof :: Dict (GServerConstraints api m)
931+ gServerProof :: Dict (GServerConstraints api m)
932932
933933instance
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
939939instance
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+3−3
@@ -595,10 +595,10 @@ type GLinkConstraints routes a =
595595 )
596596
597597class GLink (routes :: * -> *) (a :: *) where
598− proof :: Dict (GLinkConstraints routes a)
598+ gLinkProof :: Dict (GLinkConstraints routes a)
599599
600600instance GLinkConstraints routes a => GLink routes a where
601− proof = Dict
601+ gLinkProof = Dict
602602
603603instance
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