From 4c21c092ab7a48a2e9141159a3ca14bd9773febd Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 21 Feb 2012 15:17:36 +0200 Subject: [PATCH] Fix Haddocks (#277) --- yesod-core/Yesod/Core.hs | 1 + yesod-core/Yesod/Internal/Core.hs | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/yesod-core/Yesod/Core.hs b/yesod-core/Yesod/Core.hs index e27ffedf..6a59c563 100644 --- a/yesod-core/Yesod/Core.hs +++ b/yesod-core/Yesod/Core.hs @@ -30,6 +30,7 @@ module Yesod.Core -- * JS loaders , loadJsYepnope , ScriptLoadPosition (..) + , BottomOfHeadAsync -- * Misc , yesodVersion , yesodRender diff --git a/yesod-core/Yesod/Internal/Core.hs b/yesod-core/Yesod/Internal/Core.hs index f099eefa..8aabc737 100644 --- a/yesod-core/Yesod/Internal/Core.hs +++ b/yesod-core/Yesod/Internal/Core.hs @@ -27,6 +27,7 @@ module Yesod.Internal.Core , messageLoggerHandler -- * jsLoader , ScriptLoadPosition (..) + , BottomOfHeadAsync , loadJsYepnope -- * Misc , yesodVersion @@ -641,11 +642,15 @@ $case jsLoader master : attrs ) -data Yesod master => ScriptLoadPosition master = BottomOfBody | BottomOfHeadBlocking | BottomOfHeadAsync ( - [Text] -- ^ urls to load asynchronously - -> Maybe (HtmlUrl (Route master)) -- ^ widget of js to run on async completion - -> (HtmlUrl (Route master)) -- ^ widget to insert at the bottom of - ) +data ScriptLoadPosition master + = BottomOfBody + | BottomOfHeadBlocking + | BottomOfHeadAsync (BottomOfHeadAsync master) + +type BottomOfHeadAsync master + = [Text] -- ^ urls to load asynchronously + -> Maybe (HtmlUrl (Route master)) -- ^ widget of js to run on async completion + -> (HtmlUrl (Route master)) -- ^ widget to insert at the bottom of left :: Either a b -> Maybe a left (Left x) = Just x