dhall 1.11.0 → 1.11.1
raw patch · 5 files changed
+38/−9 lines, 5 filesdep ~ansi-terminaldep ~basedep ~exceptionsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: ansi-terminal, base, exceptions
API changes (from Hackage documentation)
Files
- CHANGELOG.md +15/−0
- dhall.cabal +4/−4
- src/Dhall/Core.hs +10/−2
- src/Dhall/Parser.hs +6/−0
- src/Dhall/Pretty/Internal.hs +3/−3
CHANGELOG.md view
@@ -1,3 +1,18 @@+1.11.1++* Support GHC 8.4+ * See: https://github.com/dhall-lang/dhall-haskell/pull/321+* Fix α-normalization bug+ * Note that this is not a type-checking bug. This only affects users who+ were directly using the `alphaNormalize` function from the Haskell API+ because `let` expressions were not correctly α-normalized+ * See: https://github.com/dhall-lang/dhall-haskell/pull/319+* Slight tweak to syntax highlighting+ * See: https://github.com/dhall-lang/dhall-haskell/pull/324+* Increase upper bound on `ansi-terminal` and `exceptions`+ * See: https://github.com/dhall-lang/dhall-haskell/pull/322+ * See: https://github.com/dhall-lang/dhall-haskell/pull/325+ 1.11.0 * BREAKING CHANGE TO THE API: Fix `{Natural,Optional,List}/build` semantics to
dhall.cabal view
@@ -1,5 +1,5 @@ Name: dhall-Version: 1.11.0+Version: 1.11.1 Cabal-Version: >=1.8.0.2 Build-Type: Simple Tested-With: GHC == 8.0.1@@ -161,7 +161,7 @@ containers >= 0.5.0.0 && < 0.6 , contravariant < 1.5 , cryptonite >= 0.23 && < 1.0 ,- exceptions >= 0.8.3 && < 0.10,+ exceptions >= 0.8.3 && < 0.11, directory >= 1.3 && < 1.4 , filepath >= 1.4 && < 1.5 , http-client >= 0.4.30 && < 0.6 ,@@ -196,7 +196,7 @@ Hs-Source-Dirs: dhall Main-Is: Main.hs Build-Depends:- ansi-terminal >= 0.6.3.1 && < 0.8 ,+ ansi-terminal >= 0.6.3.1 && < 0.9 , base >= 4 && < 5 , dhall , optparse-generic >= 1.1.1 && < 1.4 ,@@ -229,7 +229,7 @@ Main-Is: Main.hs Build-Depends: base >= 4 && < 5 ,- ansi-terminal >= 0.6.3.1 && < 0.8 ,+ ansi-terminal >= 0.6.3.1 && < 0.9 , dhall , optparse-generic >= 1.1.1 && < 1.4 , prettyprinter >= 1.2.0.1 && < 1.3 ,
src/Dhall/Core.hs view
@@ -471,10 +471,18 @@ instance Monoid (Chunks s a) where mempty = Chunks [] mempty +#if MIN_VERSION_base(4,11,0)+instance Semigroup (Chunks s a) where+ (<>) (Chunks xysL zL) (Chunks [] zR) =+ Chunks xysL (zL <> zR)+ (<>) (Chunks xysL zL) (Chunks ((x, y):xysR) zR) =+ Chunks (xysL ++ (zL <> x, y):xysR) zR+#else mappend (Chunks xysL zL) (Chunks [] zR) = Chunks xysL (zL <> zR) mappend (Chunks xysL zL) (Chunks ((x, y):xysR) zR) = Chunks (xysL ++ (zL <> x, y):xysR) zR+#endif instance IsString (Chunks s a) where fromString str = Chunks [] (fromString str)@@ -882,7 +890,7 @@ a₁ = alphaNormalize a₀ alphaNormalize (Let x (Just _A₀) a₀ b₀) =- Let x (Just _A₁) a₁ b₃+ Let "_" (Just _A₁) a₁ b₃ where _A₁ = alphaNormalize _A₀ @@ -894,7 +902,7 @@ b₂ = shift (-1) (V x 0) b₁ b₃ = alphaNormalize b₂ alphaNormalize (Let x Nothing a₀ b₀) =- Let x Nothing a₁ b₃+ Let "_" Nothing a₁ b₃ where a₁ = alphaNormalize a₀
src/Dhall/Parser.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-}@@ -97,7 +98,12 @@ instance Monoid a => Monoid (Parser a) where mempty = pure mempty +#if MIN_VERSION_base(4,11,0)+instance Semigroup a => Semigroup (Parser a) where+ (<>) = liftA2 (<>)+#else mappend = liftA2 mappend+#endif instance IsString a => IsString (Parser a) where fromString x = fmap fromString (Text.Parser.Char.string x)
src/Dhall/Pretty/Internal.hs view
@@ -62,12 +62,12 @@ purposes -} annToAnsiStyle :: Ann -> Terminal.AnsiStyle-annToAnsiStyle Keyword = Terminal.colorDull Terminal.Green-annToAnsiStyle Syntax = Terminal.colorDull Terminal.Green+annToAnsiStyle Keyword = Terminal.bold <> Terminal.colorDull Terminal.Green+annToAnsiStyle Syntax = Terminal.bold <> Terminal.colorDull Terminal.Green annToAnsiStyle Label = mempty annToAnsiStyle Literal = Terminal.colorDull Terminal.Magenta annToAnsiStyle Builtin = Terminal.underlined-annToAnsiStyle Operator = Terminal.colorDull Terminal.Green+annToAnsiStyle Operator = Terminal.bold <> Terminal.colorDull Terminal.Green -- | Pretty print an expression prettyExpr :: Pretty a => Expr s a -> Doc Ann