packages feed

ede 0.2.8.7 → 0.2.9

raw patch · 3 files changed

+19/−2 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Text.EDE: infixr 8 .=
- Text.EDE: Columns :: {-# UNPACK #-} ~Int64 -> {-# UNPACK #-} ~Int64 -> Delta
+ Text.EDE: Columns :: {-# UNPACK #-} !Int64 -> {-# UNPACK #-} !Int64 -> Delta
- Text.EDE: Directed :: ~ByteString -> {-# UNPACK #-} ~Int64 -> {-# UNPACK #-} ~Int64 -> {-# UNPACK #-} ~Int64 -> {-# UNPACK #-} ~Int64 -> Delta
+ Text.EDE: Directed :: !ByteString -> {-# UNPACK #-} !Int64 -> {-# UNPACK #-} !Int64 -> {-# UNPACK #-} !Int64 -> {-# UNPACK #-} !Int64 -> Delta
- Text.EDE: Lines :: {-# UNPACK #-} ~Int64 -> {-# UNPACK #-} ~Int64 -> {-# UNPACK #-} ~Int64 -> {-# UNPACK #-} ~Int64 -> Delta
+ Text.EDE: Lines :: {-# UNPACK #-} !Int64 -> {-# UNPACK #-} !Int64 -> {-# UNPACK #-} !Int64 -> {-# UNPACK #-} !Int64 -> Delta
- Text.EDE: Tab :: {-# UNPACK #-} ~Int64 -> {-# UNPACK #-} ~Int64 -> {-# UNPACK #-} ~Int64 -> Delta
+ Text.EDE: Tab :: {-# UNPACK #-} !Int64 -> {-# UNPACK #-} !Int64 -> {-# UNPACK #-} !Int64 -> Delta
- Text.EDE: delimBlock :: HasSyntax c_amwz => Lens' c_amwz Delim
+ Text.EDE: delimBlock :: HasSyntax c_ales => Lens' c_ales Delim
- Text.EDE: delimComment :: HasSyntax c_amwz => Lens' c_amwz Delim
+ Text.EDE: delimComment :: HasSyntax c_ales => Lens' c_ales Delim
- Text.EDE: delimInline :: HasSyntax c_amwz => Lens' c_amwz Delim
+ Text.EDE: delimInline :: HasSyntax c_ales => Lens' c_ales Delim
- Text.EDE: delimPragma :: HasSyntax c_amwz => Lens' c_amwz Delim
+ Text.EDE: delimPragma :: HasSyntax c_ales => Lens' c_ales Delim
- Text.EDE.Filters: class Quote a where quote _ _ = TVal . toJSON
+ Text.EDE.Filters: class Quote a
- Text.EDE.Filters: class Unquote a where unquote k n = \case { f@(TLam {}) -> typeErr k n (pretty f) "Value" TVal v -> case fromJSON v of { Success x -> pure x Error e -> argumentErr k n e } }
+ Text.EDE.Filters: class Unquote a

Files

ede.cabal view
@@ -1,5 +1,5 @@ name:                  ede-version:               0.2.8.7+version:               0.2.9 synopsis:              Templating language with similar syntax and features to Liquid or Jinja2. homepage:              http://github.com/brendanhay/ede license:               OtherLicense
src/Text/EDE.hs view
@@ -471,7 +471,7 @@ -- -- In the case of a literal it conforms directly to the supported boolean or relation logical -- operators from Haskell.--- If a variable is singuarly used its existence determines the result of the predicate,+-- If a variable is singularly used its existence determines the result of the predicate; -- the exception to this rule is boolean values which will be substituted into the -- expression if they exist in the supplied environment. --
src/Text/EDE/Internal/Types.hs view
@@ -42,6 +42,10 @@ import           Text.PrettyPrint.ANSI.Leijen (Doc, Pretty (..)) import qualified Text.PrettyPrint.ANSI.Leijen as PP import           Text.Trifecta.Delta+#if MIN_VERSION_base(4,9,0)+import qualified Data.List                    as List+import qualified Data.Functor.Classes         as FunctorClasses+#endif  -- | Convenience wrapper for Pretty instances. newtype PP a = PP { unPP :: a }@@ -186,6 +190,19 @@     | ELoop !Id !a !a     | EIncl !Text       deriving (Eq, Show, Functor)+#if MIN_VERSION_base(4,9,0)+instance FunctorClasses.Eq1 ExpF where+    liftEq _ (ELit a) (ELit b) = a == b+    liftEq _ (EVar a) (EVar b) = a == b+    liftEq _ (EFun a) (EFun b) = a == b+    liftEq c (EApp a1 a2) (EApp b1 b2) = a1 `c` b1 && a2 `c` b2+    liftEq c (ELet a0 a1 a2) (ELet b0 b1 b2) = a0 == b0 && a1 `c` b1 && a2 `c` b2+    liftEq c (ECase a as) (ECase b bs) = a `c` b && (List.all (uncurry altEq) $ zip as bs)+        where altEq (pA, a') (pB, b') = pA == pB && a' `c` b'+    liftEq c (ELoop a0 a1 a2) (ELoop b0 b1 b2) = a0 == b0 && a1 `c` b1 && a2 `c` b2+    liftEq _ (EIncl a) (EIncl b) = a == b+    liftEq _ _ _ = False+#endif  type Exp = Cofree ExpF