dhall-yaml 1.2.1 → 1.2.2
raw patch · 4 files changed
+15/−7 lines, 4 filesdep ~dhallPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: dhall
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- dhall-yaml.cabal +4/−4
- src/Dhall/Yaml.hs +6/−3
- tasty/data/single-document-bare.yaml +1/−0
CHANGELOG.md view
@@ -1,3 +1,7 @@+1.2.2++* [The `--documents` flag now wraps non-`List`s in a document](https://github.com/dhall-lang/dhall-haskell/pull/1977)+ 1.2.1 * [Format documents with leading `---`](https://github.com/dhall-lang/dhall-haskell/pull/1865)
dhall-yaml.cabal view
@@ -1,5 +1,5 @@ Name: dhall-yaml-Version: 1.2.1+Version: 1.2.2 Cabal-Version: >=1.10 Build-Type: Simple Tested-With: GHC == 8.4.3, GHC == 8.6.1@@ -37,9 +37,9 @@ base >= 4.11.0.0 && < 5 , aeson >= 1.0.0.0 && < 1.6 , bytestring < 0.11,- dhall >= 1.31.0 && < 1.35,+ dhall >= 1.31.0 && < 1.36, dhall-json >= 1.6.0 && < 1.8 ,- optparse-applicative >= 0.14.0.0 && < 0.16,+ optparse-applicative >= 0.14.0.0 && < 0.17, text >= 0.11.1.0 && < 1.3 , vector Exposed-Modules:@@ -66,7 +66,7 @@ Build-Depends: base , aeson ,- ansi-terminal >= 0.6.3.1 && < 0.11,+ ansi-terminal >= 0.6.3.1 && < 0.12, bytestring < 0.11, dhall , dhall-json ,
src/Dhall/Yaml.hs view
@@ -57,11 +57,14 @@ -> ByteString jsonToYaml json documents quoted = case (documents, json) of- (True, Data.Aeson.Array elems)- -> Data.ByteString.intercalate "\n"- $ (("---\n" <>) . Data.ByteString.Lazy.toStrict . encoder . (:[])) <$> Data.Vector.toList elems+ (True, Data.Aeson.Array elems) -> document elems+ (True, value) -> document (pure value) _ -> Data.ByteString.Lazy.toStrict (encoder [json]) where+ document elems =+ Data.ByteString.intercalate "\n"+ $ (("---\n" <>) . Data.ByteString.Lazy.toStrict . encoder . (:[])) <$> Data.Vector.toList elems+ style (Y.SStr s) | "\n" `Text.isInfixOf` s = Right (YE.untagged, YE.Literal YE.Clip YE.IndentAuto, s)
tasty/data/single-document-bare.yaml view
@@ -1,1 +1,2 @@+--- abc