on master help sign in
Rename proof to g{Client,Server,Link}Proof
f2bd982Gaël Deest
servant-client-core/src/Servant/Client/Core/HasClient.hs+4−4
@@ -828,10 +828,10 @@ type GClientConstraints api m =
828 )
828 )
829
829
830class GClient (api :: * -> *) m where
830class GClient (api :: * -> *) m where
831− proof :: Dict (GClientConstraints api m)
831+ gClientProof :: Dict (GClientConstraints api m)
832
832
833instance GClientConstraints api m => GClient api m where
833instance GClientConstraints api m => GClient api m where
834− proof = Dict
834+ gClientProof = Dict
835
835
836instance
836instance
837 ( forall n. GClient api n
837 ( forall n. GClient api n
@@ -843,7 +843,7 @@ instance
843
843
844 clientWithRoute :: Proxy m -> Proxy (NamedRoutes api) -> Request -> Client m (NamedRoutes api)
844 clientWithRoute :: Proxy m -> Proxy (NamedRoutes api) -> Request -> Client m (NamedRoutes api)
845 clientWithRoute pm _ request =
845 clientWithRoute pm _ request =
846− case proof @api @m of
846+ case gClientProof @api @m of
847 Dict -> fromServant $ clientWithRoute pm (Proxy @(ToServantApi api)) request
847 Dict -> fromServant $ clientWithRoute pm (Proxy @(ToServantApi api)) request
848
848
849 hoistClientMonad
849 hoistClientMonad
@@ -854,7 +854,7 @@ instance
854 -> Client ma (NamedRoutes api)
854 -> Client ma (NamedRoutes api)
855 -> Client mb (NamedRoutes api)
855 -> Client mb (NamedRoutes api)
856 hoistClientMonad _ _ nat clientA =
856 hoistClientMonad _ _ nat clientA =
857− case (proof @api @ma, proof @api @mb) of
857+ case (gClientProof @api @ma, gClientProof @api @mb) of
858 (Dict, Dict) ->
858 (Dict, Dict) ->
859 fromServant @api @(AsClientT mb) $
859 fromServant @api @(AsClientT mb) $
860 hoistClientMonad @m @(ToServantApi api) @ma @mb Proxy Proxy nat $
860 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 =
928-- is provided in this module for all record APIs.
928-- is provided in this module for all record APIs.
929
929
930class GServer (api :: * -> *) (m :: * -> *) where
930class GServer (api :: * -> *) (m :: * -> *) where
931− proof :: Dict (GServerConstraints api m)
931+ gServerProof :: Dict (GServerConstraints api m)
932
932
933instance
933instance
934 ( ToServant api (AsServerT m) ~ ServerT (ToServantApi api) m
934 ( ToServant api (AsServerT m) ~ ServerT (ToServantApi api) m
935 , GServantProduct (Rep (api (AsServerT m)))
935 , GServantProduct (Rep (api (AsServerT m)))
936 ) => GServer api m where
936 ) => GServer api m where
937− proof = Dict
937+ gServerProof = Dict
938
938
939instance
939instance
940 ( HasServer (ToServantApi api) context
940 ( HasServer (ToServantApi api) context
@@ -950,7 +950,7 @@ instance
950 -> Delayed env (api (AsServerT Handler))
950 -> Delayed env (api (AsServerT Handler))
951 -> Router env
951 -> Router env
952 route _ ctx delayed =
952 route _ ctx delayed =
953− case proof @api @Handler of
953+ case gServerProof @api @Handler of
954 Dict -> route (Proxy @(ToServantApi api)) ctx (toServant <$> delayed)
954 Dict -> route (Proxy @(ToServantApi api)) ctx (toServant <$> delayed)
955
955
956 hoistServerWithContext
956 hoistServerWithContext
@@ -960,7 +960,7 @@ instance
960 -> api (AsServerT m)
960 -> api (AsServerT m)
961 -> api (AsServerT n)
961 -> api (AsServerT n)
962 hoistServerWithContext _ pctx nat server =
962 hoistServerWithContext _ pctx nat server =
963− case (proof @api @m, proof @api @n) of
963+ case (gServerProof @api @m, gServerProof @api @n) of
964 (Dict, Dict) ->
964 (Dict, Dict) ->
965 fromServant servantSrvN
965 fromServant servantSrvN
966 where
966 where
servant/src/Servant/Links.hs+3−3
@@ -595,10 +595,10 @@ type GLinkConstraints routes a =
595 )
595 )
596
596
597class GLink (routes :: * -> *) (a :: *) where
597class GLink (routes :: * -> *) (a :: *) where
598− proof :: Dict (GLinkConstraints routes a)
598+ gLinkProof :: Dict (GLinkConstraints routes a)
599
599
600instance GLinkConstraints routes a => GLink routes a where
600instance GLinkConstraints routes a => GLink routes a where
601− proof = Dict
601+ gLinkProof = Dict
602
602
603instance
603instance
604 ( HasLink (ToServantApi routes)
604 ( HasLink (ToServantApi routes)
@@ -613,7 +613,7 @@ instance
613 -> Link
613 -> Link
614 -> routes (AsLink a)
614 -> routes (AsLink a)
615
615
616− toLink toA _ l = case proof @routes @a of
616+ toLink toA _ l = case gLinkProof @routes @a of
617 Dict -> fromServant $ toLink toA (Proxy @(ToServantApi routes)) l
617 Dict -> fromServant $ toLink toA (Proxy @(ToServantApi routes)) l
618
618
619-- AuthProtext instances
619-- AuthProtext instances