Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
class SiteTrans (t :: * -> *) where Source #
The class of site transformations
A site transformation is a wrapper around a Yesod foundation site which augments it with additional functionality.
lift :: MonadSite m => m site a -> m (t site) a Source #
Lift a Yesod computation to a transformed computation, typically by wrapping the foundation site directly
mapSiteT :: (MonadSite m, MonadSite n, SiteCompatible site site') => (m site a -> n site' b) -> m (t site) a -> n (t site') b Source #
Transform the Yesod computation under a site transformation
Unlike transformers and mtl, ytl does not allow transformers which are
not functors in the category of (Yesod) monads. This is because all such
transformed monads must still be isomorphic to ReaderT
(since that is
their underlying representation in Yesod).
Instances
SiteTrans (ReaderSite r) Source # | |
Defined in Yesod.Trans.Class.Reader lift :: MonadSite m => m site a -> m (ReaderSite r site) a Source # mapSiteT :: (MonadSite m, MonadSite n, SiteCompatible site site') => (m site a -> n site' b) -> m (ReaderSite r site) a -> n (ReaderSite r site') b Source # | |
SiteTrans (WriterSite w) Source # | |
Defined in Yesod.Trans.Class.Writer lift :: MonadSite m => m site a -> m (WriterSite w site) a Source # mapSiteT :: (MonadSite m, MonadSite n, SiteCompatible site site') => (m site a -> n site' b) -> m (WriterSite w site) a -> n (WriterSite w site') b Source # |