diff --git a/yesod-core/Yesod/Core.hs b/yesod-core/Yesod/Core.hs index 62e1801b..12e59d52 100644 --- a/yesod-core/Yesod/Core.hs +++ b/yesod-core/Yesod/Core.hs @@ -78,6 +78,26 @@ module Yesod.Core , MonadBaseControl , MonadResource (..) , MonadLogger + -- * Commonly referenced functions/datatypes + , Application + -- * Utilities + , showIntegral + , readIntegral + -- * Shakespeare + -- ** Hamlet + , hamlet + , shamlet + , xhamlet + , HtmlUrl + -- ** Julius + , julius + , JavascriptUrl + , renderJavascriptUrl + -- ** Cassius/Lucius + , cassius + , lucius + , CssUrl + , renderCssUrl ) where import Yesod.Core.Content @@ -108,6 +128,11 @@ import Control.Monad.Trans.Control (MonadBaseControl (..)) import Control.Monad.Trans.Resource (MonadResource (..)) import Yesod.Core.Internal.LiteApp +import Text.Hamlet +import Text.Cassius +import Text.Lucius +import Text.Julius +import Network.Wai (Application) -- | Return an 'Unauthorized' value, with the given i18n message. unauthorizedI :: (MonadHandler m, RenderMessage (HandlerSite m) msg) => msg -> m AuthResult @@ -137,3 +162,12 @@ defaultLayoutSub :: Yesod parent => WidgetT child IO () -> HandlerT child (HandlerT parent IO) Html defaultLayoutSub cwidget = widgetToParentWidget cwidget >>= lift . defaultLayout + +showIntegral :: Integral a => a -> String +showIntegral x = show (fromIntegral x :: Integer) + +readIntegral :: Num a => String -> Maybe a +readIntegral s = + case reads s of + (i, _):_ -> Just $ fromInteger i + [] -> Nothing diff --git a/yesod/Yesod.hs b/yesod/Yesod.hs index 16c6eb1e..b3671445 100644 --- a/yesod/Yesod.hs +++ b/yesod/Yesod.hs @@ -6,43 +6,8 @@ module Yesod module Yesod.Core , module Yesod.Form , module Yesod.Persist - -- * Commonly referenced functions/datatypes - , Application - -- * Utilities - , showIntegral - , readIntegral - -- * Hamlet library - -- ** Hamlet - , hamlet - , xhamlet - , HtmlUrl - -- ** Julius - , julius - , JavascriptUrl - , renderJavascriptUrl - -- ** Cassius/Lucius - , cassius - , lucius - , CssUrl - , renderCssUrl ) where import Yesod.Core -import Text.Hamlet -import Text.Cassius -import Text.Lucius -import Text.Julius - import Yesod.Form import Yesod.Persist - -import Network.Wai - -showIntegral :: Integral a => a -> String -showIntegral x = show (fromIntegral x :: Integer) - -readIntegral :: Num a => String -> Maybe a -readIntegral s = - case reads s of - (i, _):_ -> Just $ fromInteger i - [] -> Nothing diff --git a/yesod/yesod.cabal b/yesod/yesod.cabal index 498fd4b2..c8f2ee1d 100644 --- a/yesod/yesod.cabal +++ b/yesod/yesod.cabal @@ -1,5 +1,5 @@ name: yesod -version: 1.2.0.1 +version: 1.2.1 license: MIT license-file: LICENSE author: Michael Snoyman @@ -22,7 +22,7 @@ library cpp-options: -DWINDOWS build-depends: base >= 4.3 && < 5 - , yesod-core >= 1.2 && < 1.3 + , yesod-core >= 1.2.2 && < 1.3 , yesod-auth >= 1.2 && < 1.3 , yesod-persistent >= 1.2 && < 1.3 , yesod-form >= 1.3 && < 1.4