on develop help sign in
Correcting documentation
26dcca5Brendan Hay
gogol/src/Network/Google/Auth/Scope.hs+4−2
@@ -55,8 +55,8 @@ forbid = id
55(!) :: proxy xs -> proxy ys -> Proxy (xs ++ ys)
55(!) :: proxy xs -> proxy ys -> Proxy (xs ++ ys)
56(!) _ _ = Proxy
56(!) _ _ = Proxy
57
57
58−-- | Determine if _any_ of the scopes a request requires is a subset
58+-- | Determine if _any_ of the scopes a request requires is
59−-- of the scopes the credentials supports.
59+-- listed in the scopes the credentials supports.
60--
60--
61-- For error message/presentation purposes, this wraps the result of
61-- For error message/presentation purposes, this wraps the result of
62-- the membership checks below.
62-- the membership checks below.
@@ -67,10 +67,12 @@ type family MatchAnyScope a s where
67 MatchAnyScope '[] s = 'True
67 MatchAnyScope '[] s = 'True
68 MatchAnyScope a (x ': xs) = x ∈ a || MatchAnyScope a xs
68 MatchAnyScope a (x ': xs) = x ∈ a || MatchAnyScope a xs
69
69
70+-- | Set membership.
70type family (∈) a b where
71type family (∈) a b where
71 (∈) x '[] = 'False
72 (∈) x '[] = 'False
72 (∈) x (y ': xs) = x == y || x ∈ xs
73 (∈) x (y ': xs) = x == y || x ∈ xs
73
74
75+-- | Append.
74type family (++) xs ys where
76type family (++) xs ys where
75 (++) a '[] = a
77 (++) a '[] = a
76 (++) '[] b = b
78 (++) '[] b = b