packages feed

heterocephalus 1.0.0 → 1.0.0.1

raw patch · 3 files changed

+24/−9 lines, 3 filesdep ~template-haskellPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: template-haskell

API changes (from Hackage documentation)

Files

heterocephalus.cabal view
@@ -1,7 +1,11 @@ name:                heterocephalus-version:             1.0.0-synopsis:            A flexible and type safe template engine for Haskell.-description:         Please see README.md+version:             1.0.0.1+synopsis:            A type safe template engine for collaborating with front end development tools+description:+    Recent front end developing tools are growing fast and have created the complicated ecosystem, and few front end developer want to use Shakespeare template instead of commonly used @node@ friendly engines such that @pug@, @slim@, @haml@, though Shakespeare template has great feature of compile time variable interpolation and type checking.++    From this observation, Heterocephalus is developed for using with another feature rich template engine and only provides the way to interpolate server side variables into the precompiled template file with @forall@ and @if@ statement.+ homepage:            https://github.com/arowM/heterocephalus#readme license:             MIT license-file:        LICENSE@@ -22,10 +26,10 @@                      , blaze-html                      , blaze-markup                      , containers-                     , parsec-                     , shakespeare-                     , template-haskell-                     , text+                     , parsec >= 3 && < 4+                     , shakespeare >= 2 && < 3+                     , template-haskell >= 2.7+                     , text >= 0.7   default-language:    Haskell2010  test-suite heterocephalus-test
src/Text/Hamlet/Parse.hs view
@@ -1,7 +1,6 @@ {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} module Text.Hamlet.Parse     ( Result (..)
src/Text/Heterocephalus.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE CPP #-}  module Text.Heterocephalus   (@@ -21,7 +22,11 @@ import Data.Text (Text, pack) import qualified Data.Text.Lazy as TL import Language.Haskell.TH.Quote+#if MIN_VERSION_template_haskell(2,9,0) import Language.Haskell.TH.Syntax hiding (Module)+#else+import Language.Haskell.TH.Syntax+#endif import Text.Blaze (preEscapedToMarkup) import Text.Blaze.Html (toHtml) import Text.Blaze.Internal (preEscapedText)@@ -93,7 +98,9 @@ -} compileFile :: HeterocephalusSetting -> FilePath -> Q Exp compileFile set fp = do+#ifdef GHC_7_4   qAddDependentFile fp+#endif   contents <- fmap TL.unpack $ qRunIO $ readUtf8File fp   compileFromString set contents @@ -248,8 +255,13 @@   -- data constructor and not the type constructor if their names match.  = do   Just conName <- lookupValueName $ conToStr conStr-  DataConI _ _ typeName <- reify conName+#if MIN_VERSION_template_haskell(2,11,0)+  DataConI _ _ typeName         <- reify conName   TyConI (DataD _ _ _ _ cons _) <- reify typeName+#else+  DataConI _ _ typeName _     <- reify conName+  TyConI (DataD _ _ _ cons _) <- reify typeName+#endif   [fields] <- return [fields | RecC name fields <- cons, name == conName]   return [fieldName | (fieldName, _, _) <- fields]