stache 0.1.2 → 0.1.3
raw patch · 6 files changed
+27/−42 lines, 6 filesdep ~stache
Dependency ranges changed: stache
Files
- CHANGELOG.md +6/−0
- README.md +5/−7
- Text/Mustache.hs +5/−8
- Text/Mustache/Parser.hs +1/−1
- Text/Mustache/Render.hs +2/−4
- stache.cabal +8/−22
CHANGELOG.md view
@@ -1,3 +1,9 @@+## Stache 0.1.3++* Cosmetic improvements.++* Minor improvement in performance of parser.+ ## Stache 0.1.2 * Fixed compilation of benchmarks with Megaparsec 5.0.1 and later.
README.md view
@@ -9,15 +9,13 @@ This is a Haskell implementation of Mustache templates. The implementation conforms to the version 1.1.3 of official [Mustache specification]-(https://github.com/mustache/spec). It's also faster than some alternative-Mustache implementations in Haskell because it uses `Data.Text.Lazy.Builder`-under the hood. It is extremely simple and straightforward to use with-minimal but complete API — three functions to compile templates (from-directory, from file, and from lazy text) and one to render them.+(https://github.com/mustache/spec). It is extremely simple and+straightforward to use with minimal but complete API — three functions to+compile templates (from directory, from file, and from lazy text) and one to+render them. The implementation uses the Megaparsec parsing library to parse the-templates which is results in superior quality of error messages and is also-faster than Parsec-based ones.+templates which is results in superior quality of error messages. For rendering you only need to create Aeson's `Value` where you put the data to interpolate. Since the library re-uses Aeson's instances and most data
Text/Mustache.hs view
@@ -9,16 +9,13 @@ -- -- This is a Haskell implementation of Mustache templates. The -- implementation conforms to the version 1.1.3 of official Mustache--- specification <https://github.com/mustache/spec>. It's also faster than--- some alternative Mustache implementations in Haskell because it uses--- "Data.Text.Lazy.Builder" under the hood. It is extremely simple and--- straightforward to use with minimal but complete API — three functions to--- compile templates (from directory, from file, and from lazy text) and one--- to render them.+-- specification <https://github.com/mustache/spec>. It is extremely simple+-- and straightforward to use with minimal but complete API — three+-- functions to compile templates (from directory, from file, and from lazy+-- text) and one to render them. -- -- The implementation uses the Megaparsec parsing library to parse the--- templates which is results in superior quality of error messages and is--- also faster than Parsec-based ones.+-- templates which is results in superior quality of error messages. -- -- For rendering you only need to create Aeson's 'Data.Aeson.Value' where -- you put the data to interpolate. Since the library re-uses Aeson's
Text/Mustache/Parser.hs view
@@ -17,7 +17,7 @@ import Control.Applicative import Control.Monad-import Control.Monad.State.Lazy+import Control.Monad.State.Strict import Data.Char (isSpace) import Data.List (intercalate) import Data.Maybe (catMaybes)
Text/Mustache/Render.hs view
@@ -11,10 +11,8 @@ -- import the module, because "Text.Mustache" re-exports everything you may -- need, import that module instead. -{-# LANGUAGE CPP #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE OverloadedStrings #-} module Text.Mustache.Render ( renderMustache )
stache.cabal view
@@ -31,7 +31,7 @@ -- POSSIBILITY OF SUCH DAMAGE. name: stache-version: 0.1.2+version: 0.1.3 cabal-version: >= 1.10 license: BSD3 license-file: LICENSE.md@@ -43,25 +43,11 @@ synopsis: Mustache templates for Haskell build-type: Simple description: Mustache templates for Haskell.-extra-source-files: CHANGELOG.md+extra-doc-files: CHANGELOG.md , README.md- , bench-data/comprehensive.mustache- , bench-data/escaped-var.mustache- , bench-data/inverted-section.mustache- , bench-data/lorem-ipsum.mustache- , bench-data/nested-sections.mustache- , bench-data/partial.mustache- , bench-data/section.mustache- , bench-data/unescaped-var-spec.mustache- , bench-data/unescaped-var.mustache- , specs/comments.yml- , specs/delimiters.yml- , specs/interpolation.yml- , specs/inverted.yml- , specs/partials.yml- , specs/sections.yml- , templates/bar.mustache- , templates/foo.mustache+data-files: bench-data/*.mustache+ , specs/*.yml+ , templates/*.mustache source-repository head type: git@@ -111,7 +97,7 @@ , hspec >= 2.0 && < 3.0 , hspec-megaparsec >= 0.2 && < 0.3 , megaparsec >= 5.0 && < 6.0- , stache >= 0.1.2+ , stache >= 0.1.3 , text >= 1.2 && < 1.3 other-modules: Text.Mustache.Compile.THSpec , Text.Mustache.ParserSpec@@ -136,7 +122,7 @@ , file-embed , hspec >= 2.0 && < 3.0 , megaparsec >= 5.0 && < 6.0- , stache >= 0.1.2+ , stache >= 0.1.3 , text >= 1.2 && < 1.3 , yaml >= 0.8 && < 0.9 if flag(dev)@@ -154,7 +140,7 @@ , criterion >= 0.6.2.1 && < 1.2 , deepseq >= 1.4 && < 1.5 , megaparsec >= 5.0 && < 6.0- , stache >= 0.1.2+ , stache >= 0.1.3 , text >= 1.2 && < 1.3 if flag(dev) ghc-options: -Wall -Werror