Added liftHandler function
This commit is contained in:
parent
839efad98b
commit
cb51f4fa8e
@ -9,6 +9,7 @@ module Yesod.Widget
|
|||||||
( -- * Datatype
|
( -- * Datatype
|
||||||
GWidget
|
GWidget
|
||||||
, Widget
|
, Widget
|
||||||
|
, liftHandler
|
||||||
-- * Unwrapping
|
-- * Unwrapping
|
||||||
, widgetToPageContent
|
, widgetToPageContent
|
||||||
, applyLayoutW
|
, applyLayoutW
|
||||||
@ -95,6 +96,11 @@ instance Monoid (GWidget sub master ()) where
|
|||||||
-- | A 'GWidget' specialized to when the subsite and master site are the same.
|
-- | A 'GWidget' specialized to when the subsite and master site are the same.
|
||||||
type Widget y = GWidget y y
|
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 the page title. Calling 'setTitle' multiple times overrides previously
|
||||||
-- set values.
|
-- set values.
|
||||||
setTitle :: Html () -> GWidget sub master ()
|
setTitle :: Html () -> GWidget sub master ()
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod
|
name: yesod
|
||||||
version: 0.4.0.3
|
version: 0.4.1
|
||||||
license: BSD3
|
license: BSD3
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user