on master help sign in
Add comments for GClientLikeP and GClientLikeL classes
commitaa4b10c9cafd6d2ec52c529bec6c84e84c056ed5 authorCatherine Galkina <catherine@getshoptv.com> dateWed 14 Dec 2016, 11:45 (10 years ago) parent9d52cff
1 file changed+4−2
servant-client/src/Servant/Client/Generic.hs+4−2
servant-client/src/Servant/Client/Generic.hs+4−2
@@ -114,7 +114,8 @@ instance ClientLike client custom
114114instance ClientLike (ClientM a) (ClientM a) where
115115 mkClient = id
116116
117−-- GClientLikeP
117+-- | Match client structure with client functions, regarding left-nested API clients
118+-- as separate data structures.
118119class GClientLikeP client xs where
119120 gMkClientP :: client -> NP I xs
120121
@@ -125,7 +126,8 @@ instance (GClientLikeP b (y ': xs), ClientLike a x)
125126instance ClientLike a x => GClientLikeP a '[x] where
126127 gMkClientP a = I (mkClient a) :* Nil
127128
128−-- GClientLikeL
129+-- | Match client structure with client functions, expanding left-nested API clients
130+-- in the same structure.
129131class GClientLikeL (xs :: [*]) (ys :: [*]) where
130132 gMkClientL :: NP I xs -> NP I ys
131133