Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class (forall site. MonadIO (m site)) => MonadSite (m :: * -> * -> *) where
- askSite :: m site site
- withSiteT :: SiteCompatible site site' => (site -> site') -> m site' a -> m site a
Documentation
class (forall site. MonadIO (m site)) => MonadSite (m :: * -> * -> *) where Source #
A unified class instance for Yesod's site-using monads
This is used for functions which work for both WidgetFor
and HandlerFor
.
askSite :: m site site Source #
Get the site itself in a computation
withSiteT :: SiteCompatible site site' => (site -> site') -> m site' a -> m site a Source #
Run a computation under a given site transformation
This is the main entry point for site transformations - note that the site parameter is contravariant.
Instances
MonadSite HandlerFor Source # | |
Defined in Yesod.Site.Class askSite :: HandlerFor site site Source # withSiteT :: SiteCompatible site site' => (site -> site') -> HandlerFor site' a -> HandlerFor site a Source # | |
MonadSite WidgetFor Source # | |