From 82cf5d5b61814f8d31abd478dce0daa64837def3 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 23 Apr 2012 15:13:29 +0300 Subject: [PATCH] yesod: blaze-html 0.5 --- yesod/Yesod.hs | 5 +++++ yesod/yesod.cabal | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/yesod/Yesod.hs b/yesod/Yesod.hs index f4beb6b6..b9d05b30 100644 --- a/yesod/Yesod.hs +++ b/yesod/Yesod.hs @@ -1,4 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE CPP #-} -- | This module simply re-exports from other modules for your convenience. module Yesod ( -- * Re-exports from yesod-core @@ -53,7 +54,11 @@ import Network.Wai.Logger import Network.Wai.Handler.Warp (run) import System.IO (stderr, stdout, hFlush, hPutStrLn) import System.Log.FastLogger +#if MIN_VERSION_blaze_html(0, 5, 0) +import Text.Blaze.Html (toHtml) +#else import Text.Blaze (toHtml) +#endif showIntegral :: Integral a => a -> String showIntegral x = show (fromIntegral x :: Integer) diff --git a/yesod/yesod.cabal b/yesod/yesod.cabal index 3c1769a1..dac53d51 100644 --- a/yesod/yesod.cabal +++ b/yesod/yesod.cabal @@ -1,5 +1,5 @@ name: yesod -version: 1.0.1.1 +version: 1.0.1.2 license: MIT license-file: LICENSE author: Michael Snoyman @@ -66,6 +66,10 @@ flag threaded default: True description: Build with support for multithreaded execution +flag blaze_html_0_5 + description: use blaze-html 0.5 and blaze-markup 0.5 + default: False + library if flag(ghc7) build-depends: base >= 4.3 && < 5 @@ -86,7 +90,15 @@ library , shakespeare-js >= 1.0 && < 1.1 , shakespeare-css >= 1.0 && < 1.1 , warp >= 1.2 && < 1.3 - , blaze-html >= 0.4.1.3 && < 0.5 + + if flag(blaze_html_0_5) + build-depends: + blaze-html >= 0.5 && < 0.6 + , blaze-markup >= 0.5.1 && < 0.6 + else + build-depends: + blaze-html >= 0.4 && < 0.5 + exposed-modules: Yesod ghc-options: -Wall