@@ -28,6 +28,9 @@
2828-- application stack.
2929module Network.Google
3030 (
31+ -- * Usage
32+ -- $usage
33+
3134 -- * Running Google Actions
3235 Google (..)
3336 , MonadGoogle (..)
@@ -44,12 +47,14 @@ module Network.Google
4447 , getApplicationDefault
4548
4649 -- ** Authorization
50+ -- $auth
51+
4752 , allow
4853 , forbid
4954 , (!)
5055
56+ , AllowScopes
5157 , type HasScope
52− , type HasScope'
5358
5459 -- * Sending Requests
5560 , send
@@ -152,17 +157,17 @@ runGoogle :: (MonadResource m, HasEnv s r) => r -> Google s a -> m a
152157runGoogle e m = liftResourceT $ runReaderT (unGoogle m) (e ^. environment)
153158
154159-- | Monads in which 'Google' actions may be embedded.
155−class ( Allow s
156− , Functor m
160+class ( Functor m
157161 , Applicative m
158162 , Monad m
159163 , MonadIO m
160164 , MonadCatch m
165+ , AllowScopes s
161166 ) => MonadGoogle s m | m -> s where
162167 -- | Lift a computation to the 'Google' monad.
163168 liftGoogle :: Google s a -> m a
164169
165−instance Allow s => MonadGoogle s (Google s) where
170+instance AllowScopes s => MonadGoogle s (Google s) where
166171 liftGoogle = id
167172
168173instance MonadBaseControl IO (Google s) where
@@ -243,6 +248,14 @@ upload x = send . MediaUpload x
243248hoistError :: MonadThrow m => Either Error a -> m a
244249hoistError = either (throwingM _Error) return
245250
251+{- $usage
252+Usage explanation and example placeholder.
253+-}
254+
255+{- $auth
256+Authorization explanation and example placeholder.
257+-}
258+
246259{- $async
247260Requests can be sent asynchronously, but due to guarantees about resource closure
248261require the use of <http://hackage.haskell.org/package/lifted-async lifted-async>.