packages feed

ginger 0.1.5.0 → 0.1.6.0

raw patch · 4 files changed

+10/−2 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ginger.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                ginger-version:             0.1.5.0+version:             0.1.6.0 synopsis:            An implementation of the Jinja2 template language in Haskell description:         Ginger is Jinja, minus the most blatant pythonisms. Wants                      to be feature complete, but isn't quite there yet.
src/Text/Ginger/GVal.hs view
@@ -266,7 +266,7 @@         }     where         hm = HashMap.fromList xs---+ -- | Construct a pair from a key and a value. (~>) :: ToGVal m a => Text -> a -> Pair m k ~> v = (k, toGVal v)
src/Text/Ginger/Parse.hs view
@@ -464,6 +464,7 @@     operativeExprP         additiveExprP         [ ("==", "equals")+        , ("!=", "nequals")         ]  additiveExprP :: Monad m => Parser m Expression
src/Text/Ginger/Run.hs view
@@ -136,6 +136,7 @@             , ("default", fromFunction gfnDefault)             , ("difference", fromFunction . variadicNumericFunc 0 $ difference)             , ("equals", fromFunction gfnEquals)+            , ("nequals", fromFunction gfnNEquals)             , ("floor", fromFunction . unaryNumericFunc 0 $ Prelude.fromIntegral . Prelude.floor)             , ("int", fromFunction . unaryFunc $ toGVal . (fmap (Prelude.truncate :: Scientific -> Int)) . asNumber)             , ("int_ratio", fromFunction . variadicNumericFunc 1 $ fromIntegral . intRatio . Prelude.map Prelude.floor)@@ -179,6 +180,12 @@         gfnEquals (x:[]) = return $ toGVal True         gfnEquals (x:xs) =             return . toGVal $ Prelude.all ((snd x `looseEquals`) . snd) xs++        gfnNEquals :: Function (Run m)+        gfnNEquals [] = return $ toGVal True+        gfnNEquals (x:[]) = return $ toGVal True+        gfnNEquals (x:xs) =+            return . toGVal $ Prelude.any (not . (snd x `looseEquals`) . snd) xs          looseEquals :: GVal (Run m) -> GVal (Run m) -> Bool         looseEquals a b