Fixed Hamlet version

This commit is contained in:
Michael Snoyman 2010-12-25 20:32:49 +02:00
parent 888336029f
commit d7dd2fd051
3 changed files with 6 additions and 6 deletions

2
README
View File

@ -1,3 +1 @@
After installing, type "yesod init" to start a new project.
Learn more at http://docs.yesodweb.com/

View File

@ -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

View File

@ -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