on develop help sign in
make constraint parameter any kind
e486386Aleksey Makarov
gogol/src/Network/Google/Auth/InstalledApplication.hs+4−1
@@ -1,4 +1,6 @@
1+{-# LANGUAGE KindSignatures #-}
1{-# LANGUAGE OverloadedStrings #-}
2{-# LANGUAGE OverloadedStrings #-}
3+{-# LANGUAGE DataKinds #-}
2
4
3-- |
5-- |
4-- Module : Network.Google.Auth.InstalledApplication
6-- Module : Network.Google.Auth.InstalledApplication
@@ -32,6 +34,7 @@ module Network.Google.Auth.InstalledApplication
32import Control.Monad.Catch (MonadCatch)
34import Control.Monad.Catch (MonadCatch)
33import Control.Monad.IO.Class (MonadIO)
35import Control.Monad.IO.Class (MonadIO)
34import qualified Data.Text.Encoding as Text
36import qualified Data.Text.Encoding as Text
37+import GHC.TypeLits (Symbol)
35import Network.Google.Auth.Scope (AllowScopes (..),
38import Network.Google.Auth.Scope (AllowScopes (..),
36 queryEncodeScopes)
39 queryEncodeScopes)
37import Network.Google.Internal.Auth
40import Network.Google.Internal.Auth
@@ -83,7 +86,7 @@ redirectURI = "urn:ietf:wg:oauth:2.0:oob"
83-- construct a URL that can be used to obtain the 'OAuthCode'.
86-- construct a URL that can be used to obtain the 'OAuthCode'.
84--
87--
85-- /See:/ <https://developers.google.com/accounts/docs/OAuth2InstalledApp#formingtheurl Forming the URL>.
88-- /See:/ <https://developers.google.com/accounts/docs/OAuth2InstalledApp#formingtheurl Forming the URL>.
86−formURL :: AllowScopes s => OAuthClient -> proxy s -> Text
89+formURL :: AllowScopes (s :: [Symbol]) => OAuthClient -> proxy s -> Text
87formURL c = formURLWith c . allowScopes
90formURL c = formURLWith c . allowScopes
88
91
89-- | Form a URL using 'OAuthScope' values.
92-- | Form a URL using 'OAuthScope' values.