Added liftHandler function

This commit is contained in:
Michael Snoyman 2010-07-15 18:05:44 +03:00
parent 839efad98b
commit cb51f4fa8e
2 changed files with 7 additions and 1 deletions

View File

@ -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 ()

View File

@ -1,5 +1,5 @@
name: yesod
version: 0.4.0.3
version: 0.4.1
license: BSD3
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>