ytl-0.1.0.0: mtl-style transformations for Yesod sites
Safe HaskellNone
LanguageHaskell2010

Yesod.Site.Class

Synopsis

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.

Methods

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

Instances details
MonadSite HandlerFor Source # 
Instance details

Defined in Yesod.Site.Class

Methods

askSite :: HandlerFor site site Source #

withSiteT :: SiteCompatible site site' => (site -> site') -> HandlerFor site' a -> HandlerFor site a Source #

MonadSite WidgetFor Source # 
Instance details

Defined in Yesod.Site.Class

Methods

askSite :: WidgetFor site site Source #

withSiteT :: SiteCompatible site site' => (site -> site') -> WidgetFor site' a -> WidgetFor site a Source #