doctemplates 0.2.1 → 0.2.2
raw patch · 2 files changed
+9/−2 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Text.DocTemplates: instance Data.Semigroup.Semigroup Text.DocTemplates.Template
Files
- doctemplates.cabal +1/−1
- src/Text/DocTemplates.hs +8/−1
doctemplates.cabal view
@@ -1,5 +1,5 @@ name: doctemplates-version: 0.2.1+version: 0.2.2 synopsis: Pandoc-style document templates description: A simple text templating system used by pandoc. homepage: https://github.com/jgm/doctemplates#readme
src/Text/DocTemplates.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE TypeSynonymInstances, FlexibleInstances,+{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, CPP, OverloadedStrings, GeneralizedNewtypeDeriving, ScopedTypeVariables #-} {- | Module : Text.Pandoc.Templates@@ -97,11 +97,18 @@ import Data.ByteString.Lazy (ByteString, fromChunks) import Data.Vector ((!?)) import Data.Scientific (floatingOrInteger)+#if MIN_VERSION_base(4,9,0)+import Data.Semigroup (Semigroup)+#endif -- | A 'Template' is essentially a function that takes -- a JSON 'Value' and produces 'Text'. newtype Template = Template { unTemplate :: Value -> Text }+#if MIN_VERSION_base(4,9,0)+ deriving (Semigroup, Monoid)+#else deriving Monoid+#endif type Variable = [Text]