Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge https://github.com/yesodweb/hamlet

  • Loading branch information...
commit 1e13dc01edba8bbc0a30e227b1d13f4e862f8b52 2 parents 214772d + 0a4014f
@stepcut authored
View
4 hamlet/Text/Hamlet.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleContexts #-}
@@ -246,6 +247,9 @@ hamletFromString qhr set s = do
hamletFileWithSettings :: Q HamletRules -> HamletSettings -> FilePath -> Q Exp
hamletFileWithSettings qhr set fp = do
+#ifdef GHC_7_4
+ qAddDependentFile fp
+#endif
contents <- fmap TL.unpack $ qRunIO $ readUtf8File fp
hamletFromString qhr set contents
View
2  hamlet/hamlet.cabal
@@ -55,6 +55,8 @@ library
Text.Hamlet.RT
other-modules: Text.Hamlet.Parse
ghc-options: -Wall
+ if impl(ghc >= 7.4)
+ cpp-options: -DGHC_7_4
test-suite test
hs-source-dirs: test
2  scripts
@@ -1 +1 @@
-Subproject commit d4cb555ca5fd6bc67f7da484a63d1fcdb149eac9
+Subproject commit ab7d5442c0b54e078a2eedcac4262bae807e08a7
View
8 servius/servius.cabal
@@ -1,5 +1,5 @@
Name: servius
-Version: 0.0.1
+Version: 0.0.2
Synopsis: Serve Shakespearean templates via Warp
Homepage: http://github.com/yesodweb/hamlet
License: BSD3
@@ -15,9 +15,9 @@ Description: Does not support any variable interpolation. Supports Hamle
Executable servius
Main-is: servius.hs
Build-depends: base >= 4 && < 5
- , warp >= 1.0 && < 1.1
- , wai-app-static >= 1.0 && < 1.1
- , wai-extra >= 1.0 && < 1.1
+ , warp >= 1.1 && < 1.2
+ , wai-app-static >= 1.1 && < 1.2
+ , wai-extra >= 1.1 && < 1.2
, cmdargs >= 0.6.7
, directory >= 1.0
, containers >= 0.2 && < 0.5
View
3  shakespeare-css/Text/Cassius.hs
@@ -173,6 +173,9 @@ cassiusFromString s =
cassiusFile :: FilePath -> Q Exp
cassiusFile fp = do
+#ifdef GHC_7_4
+ qAddDependentFile fp
+#endif
contents <- fmap TL.unpack $ qRunIO $ readUtf8File fp
cassiusFromString contents
View
3  shakespeare-css/Text/Css.hs
@@ -52,6 +52,9 @@ data CDData url = CDPlain Builder
cssFileDebug :: Q Exp -> Parser [TopLevel] -> FilePath -> Q Exp
cssFileDebug parseBlocks' parseBlocks fp = do
s <- fmap TL.unpack $ qRunIO $ readUtf8File fp
+#ifdef GHC_7_4
+ qAddDependentFile fp
+#endif
let a = either (error . show) id $ parse parseBlocks s s
let (scope, contents) = go a
vs <- mapM (getVars scope) contents
View
2  shakespeare-css/shakespeare-css.cabal
@@ -41,6 +41,8 @@ library
other-modules: Text.MkSizeType
Text.Css
ghc-options: -Wall
+ if impl(ghc >= 7.4)
+ cpp-options: -DGHC_7_4
test-suite test
hs-source-dirs: test
View
2  shakespeare-js/shakespeare-js.cabal
@@ -37,6 +37,8 @@ library
Text.Julius
Text.Coffee
ghc-options: -Wall
+ if impl(ghc >= 7.4)
+ cpp-options: -DGHC_7_4
if flag(test_coffee)
cpp-options: -DTEST_COFFEE
View
11 shakespeare-test/shakespeare-test.cabal
@@ -13,7 +13,7 @@ build-type: Simple
homepage: http://www.yesodweb.com/book/templates
extra-source-files:
- test/main.hs
+ main.hs
library
exposed-modules:
@@ -32,6 +32,8 @@ library
ghc-options: -Wall
cpp-options: -DTEST -DTEST_EXPORT
+ if impl(ghc >= 7.4)
+ cpp-options: -DGHC_7_4
flag test_coffee
description: render tests through coffeescript render function
@@ -51,8 +53,11 @@ test-suite test
, template-haskell
, parsec >= 2 && < 4
- if flag(test_coffee)
- cpp-options: -DTEST_COFFEE
+ -- if impl(ghc >= 7.4)
+ -- cpp-options: -DGHC_7_4
+
+ --if flag(test_coffee)
+ -- cpp-options: -DTEST_COFFEE
source-repository head
View
2  shakespeare-text/shakespeare-text.cabal
@@ -38,6 +38,8 @@ library
exposed-modules: Text.Shakespeare.Text
ghc-options: -Wall
+ if impl(ghc >= 7.4)
+ cpp-options: -DGHC_7_4
test-suite test
hs-source-dirs: test
View
6 shakespeare/Text/Shakespeare.hs
@@ -233,7 +233,11 @@ shakespeareFromString r str = do
contentsToShakespeare r $ contentFromString r $ s
shakespeareFile :: ShakespeareSettings -> FilePath -> Q Exp
-shakespeareFile r fp = readFileQ fp >>= shakespeareFromString r
+shakespeareFile r fp = do
+#ifdef GHC_7_4
+ qAddDependentFile fp
+#endif
+ readFileQ fp >>= shakespeareFromString r
data VarType = VTPlain | VTUrl | VTUrlParam | VTMixin
Please sign in to comment.
Something went wrong with that request. Please try again.