web: fix breakage with yesod < 1.6
[ci skip]
This commit is contained in:
parent
7f1ab4485f
commit
98647ee6f2
@ -92,7 +92,11 @@ mkYesodData "App" $(parseRoutesFile "config/routes")
|
|||||||
-- | A convenience alias.
|
-- | A convenience alias.
|
||||||
type AppRoute = Route App
|
type AppRoute = Route App
|
||||||
|
|
||||||
|
#if MIN_VERSION_yesod(1,6,0)
|
||||||
type Form x = Html -> MForm (HandlerFor App) (FormResult x, Widget)
|
type Form x = Html -> MForm (HandlerFor App) (FormResult x, Widget)
|
||||||
|
#else
|
||||||
|
type Form x = Html -> MForm (HandlerT App IO) (FormResult x, Widget)
|
||||||
|
#endif
|
||||||
|
|
||||||
-- Please see the documentation for the Yesod typeclass. There are a number
|
-- Please see the documentation for the Yesod typeclass. There are a number
|
||||||
-- of settings which can be configured by overriding methods here.
|
-- of settings which can be configured by overriding methods here.
|
||||||
|
|||||||
@ -28,7 +28,11 @@ import Hledger.Web.WebOptions
|
|||||||
-- Common page layout
|
-- Common page layout
|
||||||
|
|
||||||
-- | Standard hledger-web page layout.
|
-- | Standard hledger-web page layout.
|
||||||
|
#if MIN_VERSION_yesod(1,6,0)
|
||||||
hledgerLayout :: ViewData -> String -> HtmlUrl AppRoute -> HandlerFor App Html
|
hledgerLayout :: ViewData -> String -> HtmlUrl AppRoute -> HandlerFor App Html
|
||||||
|
#else
|
||||||
|
hledgerLayout :: ViewData -> String -> HtmlUrl AppRoute -> HandlerT App IO Html
|
||||||
|
#endif
|
||||||
hledgerLayout vd title content = do
|
hledgerLayout vd title content = do
|
||||||
defaultLayout $ do
|
defaultLayout $ do
|
||||||
setTitle $ toHtml $ title ++ " - hledger-web"
|
setTitle $ toHtml $ title ++ " - hledger-web"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user