From d7dd2fd051f51af4810be0a6bec98903f8612866 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sat, 25 Dec 2010 20:32:49 +0200 Subject: [PATCH] Fixed Hamlet version --- README | 2 -- Yesod/Core.hs | 7 +++++-- yesod-core.cabal | 3 +-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README b/README index c738f600..987fd1b3 100644 --- a/README +++ b/README @@ -1,3 +1 @@ -After installing, type "yesod init" to start a new project. - Learn more at http://docs.yesodweb.com/ diff --git a/Yesod/Core.hs b/Yesod/Core.hs index 7b0c9a19..776dfb66 100644 --- a/Yesod/Core.hs +++ b/Yesod/Core.hs @@ -59,6 +59,7 @@ import Text.Cassius import Text.Julius import Web.Routes import qualified Data.JSON.Types as J +import Blaze.ByteString.Builder (toLazyByteString) #if TEST import Test.Framework (testGroup, Test) @@ -408,10 +409,12 @@ widgetToPageContent (GWidget w) = do let scripts = map (locationToHamlet . unScript) $ runUniqueList scripts' let stylesheets = map (locationToHamlet . unStylesheet) $ runUniqueList stylesheets' - let cssToHtml (Css b) = Html b + -- FIXME change hamlet: cassius and julius should be structured datatypes so we don't need to do this + let unsafeLazyByteString = mconcat . map unsafeByteString . L.toChunks + let cssToHtml (Css b) = unsafeLazyByteString $ toLazyByteString b celper :: Cassius url -> Hamlet url celper = fmap cssToHtml - jsToHtml (Javascript b) = Html b + jsToHtml (Javascript b) = unsafeLazyByteString $ toLazyByteString b jelper :: Julius url -> Hamlet url jelper = fmap jsToHtml diff --git a/yesod-core.cabal b/yesod-core.cabal index dfb33498..5f3a7760 100644 --- a/yesod-core.cabal +++ b/yesod-core.cabal @@ -31,11 +31,10 @@ library , wai >= 0.3 && < 0.4 , wai-extra >= 0.3 && < 0.4 , bytestring >= 0.9.1.4 && < 0.10 - , directory >= 1 && < 1.2 , text >= 0.5 && < 0.12 , template-haskell , web-routes-quasi >= 0.6.2 && < 0.7 - , hamlet >= 0.6 && < 0.7 + , hamlet >= 0.7 && < 0.8 , blaze-builder >= 0.2.1 && < 0.3 , transformers >= 0.2 && < 0.3 , clientsession >= 0.4.0 && < 0.5