diff --git a/Yesod/Widget.hs b/Yesod/Widget.hs index 1e081c69..ef7491ef 100644 --- a/Yesod/Widget.hs +++ b/Yesod/Widget.hs @@ -9,6 +9,7 @@ module Yesod.Widget ( -- * Datatype GWidget , Widget + , liftHandler -- * Unwrapping , widgetToPageContent , applyLayoutW @@ -95,6 +96,11 @@ instance Monoid (GWidget sub master ()) where -- | A 'GWidget' specialized to when the subsite and master site are the same. type Widget y = GWidget y y +-- | Lift an action in the 'GHandler' monad into an action in the 'GWidget' +-- monad. +liftHandler :: GHandler sub master a -> GWidget sub master a +liftHandler = GWidget . lift . lift . lift . lift . lift . lift . lift . lift + -- | Set the page title. Calling 'setTitle' multiple times overrides previously -- set values. setTitle :: Html () -> GWidget sub master () diff --git a/yesod.cabal b/yesod.cabal index e41020df..1bb7e12b 100644 --- a/yesod.cabal +++ b/yesod.cabal @@ -1,5 +1,5 @@ name: yesod -version: 0.4.0.3 +version: 0.4.1 license: BSD3 license-file: LICENSE author: Michael Snoyman