packages feed

stache 2.3.0 → 2.3.1

raw patch · 4 files changed

+19/−16 lines, 4 filesdep −unordered-containersdep ~aesondep ~mtldep ~stache

Dependencies removed: unordered-containers

Dependency ranges changed: aeson, mtl, stache, template-haskell, text

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+## Stache 2.3.1++* Uses `aeson-2.x.x.x`.+ ## Stache 2.3.0  * Allowed parsing a wider range of keys in the templates thus making the
Text/Mustache/Render.hs view
@@ -20,9 +20,10 @@  import Control.Monad.Reader import Control.Monad.State.Strict (State, execState, modify')-import Data.Aeson+import Data.Aeson hiding (Key)+import qualified Data.Aeson.Key as Aeson.Key+import qualified Data.Aeson.KeyMap as Aeson.KeyMap import Data.Foldable (asum)-import qualified Data.HashMap.Strict as H import Data.List (tails) import Data.List.NonEmpty (NonEmpty (..)) import qualified Data.List.NonEmpty as NE@@ -211,7 +212,7 @@   Maybe Value simpleLookup _ (Key []) obj = return obj simpleLookup c (Key (k : ks)) (Object m) =-  case H.lookup k m of+  case Aeson.KeyMap.lookup (Aeson.Key.fromText k) m of     Nothing -> if c then Just Null else Nothing     Just v -> simpleLookup True (Key ks) v simpleLookup _ _ _ = Nothing@@ -259,7 +260,7 @@ isBlank :: Value -> Bool isBlank Null = True isBlank (Bool False) = True-isBlank (Object m) = H.null m+isBlank (Object m) = Aeson.KeyMap.null m isBlank (Array a) = V.null a isBlank (String s) = T.null s isBlank _ = False
app/Main.hs view
@@ -5,7 +5,7 @@  import Data.Aeson (Value (..)) import qualified Data.Aeson as Aeson-import qualified Data.HashMap.Strict as HM+import qualified Data.Aeson.KeyMap as Aeson.KeyMap import Data.List (foldl') import Data.List.NonEmpty (NonEmpty (..)) import qualified Data.List.NonEmpty as NE@@ -123,7 +123,7 @@  mergeContexts :: Value -> Value -> Value mergeContexts (Aeson.Object m0) (Aeson.Object m1) =-  Aeson.Object (HM.union m0 m1)+  Aeson.Object (Aeson.KeyMap.union m0 m1) mergeContexts _ _ = error "context merge failed"  emptyContext :: Value
stache.cabal view
@@ -1,11 +1,11 @@ cabal-version:   1.18 name:            stache-version:         2.3.0+version:         2.3.1 license:         BSD3 license-file:    LICENSE.md maintainer:      Mark Karpov <markkarpov92@gmail.com> author:          Mark Karpov <markkarpov92@gmail.com>-tested-with:     ghc ==8.8.4 ghc ==8.10.4 ghc ==9.0.1+tested-with:     ghc ==8.8.4 ghc ==8.10.5 ghc ==9.0.1 homepage:        https://github.com/stackbuilders/stache bug-reports:     https://github.com/stackbuilders/stache/issues synopsis:        Mustache templates for Haskell@@ -41,7 +41,7 @@      default-language: Haskell2010     build-depends:-        aeson >=0.11 && <1.6,+        aeson >=2 && <3,         base >=4.13 && <5.0,         bytestring >=0.10 && <0.12,         containers >=0.5 && <0.7,@@ -52,7 +52,6 @@         mtl >=2.1 && <3.0,         template-haskell >=2.11 && <2.18,         text >=1.2 && <1.3,-        unordered-containers >=0.2.5 && <0.3,         vector >=0.11 && <0.13      if flag(dev)@@ -72,13 +71,12 @@     other-modules:    Paths_stache     default-language: Haskell2010     build-depends:-        aeson >=0.11 && <1.6,+        aeson >=2 && <3,         base >=4.13 && <5.0,         gitrev >=1.3 && <1.4,         optparse-applicative >=0.14 && <0.17,-        stache >=2.0 && <3.0,+        stache,         text >=0.2 && <1.3,-        unordered-containers >=0.2.5 && <0.3,         yaml >=0.8 && <0.12,         filepath >=1.2 && <1.5 @@ -103,7 +101,7 @@      default-language: Haskell2010     build-depends:-        aeson >=0.11 && <1.6,+        aeson >=2 && <3,         base >=4.13 && <5.0,         containers >=0.5 && <0.7,         hspec >=2.0 && <3.0,@@ -125,7 +123,7 @@     hs-source-dirs:   mustache-spec     default-language: Haskell2010     build-depends:-        aeson >=0.11 && <1.6,+        aeson >=2 && <3,         base >=4.13 && <5.0,         bytestring >=0.10 && <0.12,         containers >=0.5 && <0.7,@@ -148,7 +146,7 @@     hs-source-dirs:   bench     default-language: Haskell2010     build-depends:-        aeson >=0.11 && <1.6,+        aeson >=2 && <3,         base >=4.13 && <5.0,         criterion >=0.6.2.1 && <1.6,         deepseq >=1.4 && <1.5,