hpack-dhall 0.5.0 → 0.5.1
raw patch · 18 files changed
+165/−152 lines, 18 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- README.md +1/−1
- changelog.md +8/−0
- hpack-dhall.cabal +4/−4
- library/Hpack/Dhall.hs +8/−4
- package.dhall +131/−130
- test/golden/test-files/key/empty-inferred/package.yaml.cabal +1/−1
- test/golden/test-files/key/empty-package.yaml.cabal +1/−1
- test/golden/test-files/key/import-local/package.yaml.cabal +1/−1
- test/golden/test-files/key/import-relative/package.yaml.cabal +1/−1
- test/golden/test-files/key/when-dependencies.cabal +1/−1
- test/golden/test-files/key/when-dependencies.cabal.golden +1/−1
- test/golden/test-files/key/when-dependencies.dhall.golden +1/−1
- test/golden/test-files/key/when-dependencies.yaml.cabal +1/−1
- test/golden/test-files/real-world/hpack/hpack.yaml.cabal +1/−1
- test/golden/test-files/real-world/stack/stack.cabal +1/−1
- test/golden/test-files/real-world/stack/stack.cabal.golden +1/−1
- test/golden/test-files/real-world/stack/stack.dhall.golden +1/−1
- test/golden/test-files/real-world/stack/stack.yaml.cabal +1/−1
README.md view
@@ -245,5 +245,5 @@ With haskell-ci tooling installed, generate the `.travis.yml` setup with; ``` > make-travis-yml --output=.travis.yml --config=cabal.haskell-ci hpack-dhall.cabal-*INFO* Generating Travis-CI config for testing for GHC versions: 8.4.3 8.4.4 8.6.1+*INFO* Generating Travis-CI config for testing for GHC versions: 8.4.3 8.4.4 8.6.1 8.6.2 ```
changelog.md view
@@ -1,5 +1,13 @@ The [latest version](https://github.com/blockscope/hpack-dhall/blob/master/changelog.md) of this changelog. +## 0.5.1 - Sorted Fields Pretty Printing+* Regenerate golden files for the bump in hpack's version:++```+---- This file has been generated from package.yaml by hpack version 0.31.0.+++-- This file has been generated from package.yaml by hpack version 0.31.1.+```+ ## 0.5.0 - Sorted Fields Pretty Printing * Sort fields when pretty printing JSON and YAML. * Add real world golden tests, using stack and hpack packages.
hpack-dhall.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.dhall by hpack version 0.31.0.+-- This file has been generated from package.dhall by hpack version 0.31.1. -- -- see: https://github.com/sol/hpack ----- hash: 056b2248186a5860a9315055d3cbf8c57994ff2621e5f5941f214397c7ca26d9+-- hash: b3f8d5f1300d63e3eb10dd2b12fac8f38da8deb93e323b4fd95a0ffe9bbad9e9 name: hpack-dhall-version: 0.5.0+version: 0.5.1 synopsis: hpack's dhalling description: Work with hpack's top-level <https://github.com/sol/hpack#top-level-fields fields> in a Dhall@@ -24,7 +24,7 @@ copyright: © 2018 Phil de Joux, © 2018 Block Scope Limited license: BSD3 license-file: LICENSE-tested-with: GHC == 8.4.3, GHC == 8.4.4, GHC == 8.6.1+tested-with: GHC == 8.4.3, GHC == 8.4.4, GHC == 8.6.1, GHC == 8.6.2 build-type: Simple extra-source-files: package.dhall
library/Hpack/Dhall.hs view
@@ -8,10 +8,14 @@ License: BSD3 Maintainer: Phil de Joux <phil.dejoux@blockscope.com> Stability: experimental-Instead of working with <https://github.com/sol/hpack#readme hpack> in-<https://en.wikipedia.org/wiki/YAML YAML>, use-<https://github.com/dhall-lang/dhall-lang#readme Dhall>. All functions resolve-imports relative to the location of the given @.dhall@ file.+The functions in this module make it possible to configure an+<https://github.com/sol/hpack#readme hpack>+package description with+<https://github.com/dhall-lang/dhall-lang#readme Dhall>+instead of+<https://en.wikipedia.org/wiki/YAML YAML>.+When doing so, note that all functions resolve imports relative to the location+of the given @.dhall@ input file. -} module Hpack.Dhall ( fileToJson
package.dhall view
@@ -1,133 +1,134 @@- let deps =- [ "base == 4.*"- , "megaparsec >= 7.0.1"- , "dhall >= 1.18.0"- , "dhall-json >= 1.2.4"- , "hpack >= 0.31.0"- , "transformers"- , "text"- , "microlens"- , "filepath"- , "bytestring"- , "prettyprinter"- , "aeson"- , "aeson-pretty"- , "yaml"- ]--in let exe-deps = [ "hpack-dhall", "optparse-applicative" ]+let deps =+ [ "base == 4.*"+ , "megaparsec >= 7.0.1"+ , "dhall >= 1.18.0"+ , "dhall-json >= 1.2.4"+ , "hpack >= 0.31.0"+ , "transformers"+ , "text"+ , "microlens"+ , "filepath"+ , "bytestring"+ , "prettyprinter"+ , "aeson"+ , "aeson-pretty"+ , "yaml"+ ] -in { name =- "hpack-dhall"- , version =- "0.5.0"- , maintainer =- "Phil de Joux <phil.dejoux@blockscope.com>"- , copyright =- "\u00A9 2018 Phil de Joux, \u00A9 2018 Block Scope Limited"- , license =- "BSD3"- , license-file =- "LICENSE"- , category =- "Development"- , synopsis =- "hpack's dhalling"- , description =- ''- Work with hpack's top-level- <https://github.com/sol/hpack#top-level-fields fields> in a Dhall- record with the following executables;- - * with @dhall-hpack-cabal@ write the @.cabal@ for a @.dhall@ package description.- * with @dhall-hpack-dhall@ show the package description expression, with imports resolved.- * with @dhall-hpack-json@ show the package description as JSON.- * with @dhall-hpack-yaml@ show the package description as YAML.- ''- , github =- "blockscope/hpack-dhall"- , tested-with =- "GHC == 8.4.3, GHC == 8.4.4, GHC == 8.6.1"- , extra-source-files =- [ "package.dhall"- , "changelog.md"- , "README.md"- , "test/golden/**/*.dhall"- , "test/golden/**/*.dhl"- , "test/golden/**/*.cabal"- , "test/golden/**/*.json"- , "test/golden/**/*.yaml"- , "test/golden/**/*.golden"- ]- , ghc-options =- "-Wall"- , dependencies =- deps- , source-dirs =- "library"- , library =- { exposed-modules = [ "Hpack.Dhall", "Hpack.Fields" ] }- , executables =- { dhall-hpack-cabal =- { main =- "CabalMain.hs"- , source-dirs =- [ "exe/options", "exe/dhall-hpack-cabal" ]- , dependencies =- exe-deps- }- , dhall-hpack-json =- { main =- "JsonMain.hs"- , source-dirs =- [ "exe/options", "exe/dhall-hpack-json" ]- , dependencies =- exe-deps- }- , dhall-hpack-yaml =- { main =- "YamlMain.hs"- , source-dirs =- [ "exe/options", "exe/dhall-hpack-yaml" ]- , dependencies =- exe-deps- }- , dhall-hpack-dhall =- { main =- "DhallMain.hs"- , source-dirs =- [ "exe/options", "exe/dhall-hpack-dhall" ]- , dependencies =- exe-deps+in let exe-deps =+ [ "hpack-dhall", "optparse-applicative" ]+ + in { name =+ "hpack-dhall"+ , version =+ "0.5.1"+ , maintainer =+ "Phil de Joux <phil.dejoux@blockscope.com>"+ , copyright =+ "© 2018 Phil de Joux, © 2018 Block Scope Limited"+ , license =+ "BSD3"+ , license-file =+ "LICENSE"+ , category =+ "Development"+ , synopsis =+ "hpack's dhalling"+ , description =+ ''+ Work with hpack's top-level+ <https://github.com/sol/hpack#top-level-fields fields> in a Dhall+ record with the following executables;+ + * with @dhall-hpack-cabal@ write the @.cabal@ for a @.dhall@ package description.+ * with @dhall-hpack-dhall@ show the package description expression, with imports resolved.+ * with @dhall-hpack-json@ show the package description as JSON.+ * with @dhall-hpack-yaml@ show the package description as YAML.+ ''+ , github =+ "blockscope/hpack-dhall"+ , tested-with =+ "GHC == 8.4.3, GHC == 8.4.4, GHC == 8.6.1, GHC == 8.6.2"+ , extra-source-files =+ [ "package.dhall"+ , "changelog.md"+ , "README.md"+ , "test/golden/**/*.dhall"+ , "test/golden/**/*.dhl"+ , "test/golden/**/*.cabal"+ , "test/golden/**/*.json"+ , "test/golden/**/*.yaml"+ , "test/golden/**/*.golden"+ ]+ , ghc-options =+ "-Wall"+ , dependencies =+ deps+ , source-dirs =+ "library"+ , library =+ { exposed-modules = [ "Hpack.Dhall", "Hpack.Fields" ] }+ , executables =+ { dhall-hpack-cabal =+ { main =+ "CabalMain.hs"+ , source-dirs =+ [ "exe/options", "exe/dhall-hpack-cabal" ]+ , dependencies =+ exe-deps+ }+ , dhall-hpack-json =+ { main =+ "JsonMain.hs"+ , source-dirs =+ [ "exe/options", "exe/dhall-hpack-json" ]+ , dependencies =+ exe-deps+ }+ , dhall-hpack-yaml =+ { main =+ "YamlMain.hs"+ , source-dirs =+ [ "exe/options", "exe/dhall-hpack-yaml" ]+ , dependencies =+ exe-deps+ }+ , dhall-hpack-dhall =+ { main =+ "DhallMain.hs"+ , source-dirs =+ [ "exe/options", "exe/dhall-hpack-dhall" ]+ , dependencies =+ exe-deps+ } }- }- , tests =- ./default-tests.dhall- ⫽ { golden =- { main =- "Golden.hs"- , source-dirs =- [ "test/golden/src" ]- , dependencies =- [ "base"- , "Cabal"- , "Diff"- , "dhall"- , "filepath"- , "microlens"- , "prettyprinter"- , "tasty"- , "tasty-golden"- , "text"- , "megaparsec >= 7.0.1"- , "dhall >= 1.18.0"- , "dhall-json >= 1.2.4"- , "hpack >= 0.31.0"- , "transformers"- , "aeson"- , "utf8-string"- , "directory"- ]+ , tests =+ ./default-tests.dhall+ ⫽ { golden =+ { main =+ "Golden.hs"+ , source-dirs =+ [ "test/golden/src" ]+ , dependencies =+ [ "base"+ , "Cabal"+ , "Diff"+ , "dhall"+ , "filepath"+ , "microlens"+ , "prettyprinter"+ , "tasty"+ , "tasty-golden"+ , "text"+ , "megaparsec >= 7.0.1"+ , "dhall >= 1.18.0"+ , "dhall-json >= 1.2.4"+ , "hpack >= 0.31.0"+ , "transformers"+ , "aeson"+ , "utf8-string"+ , "directory"+ ]+ } }- }- }+ }
test/golden/test-files/key/empty-inferred/package.yaml.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.31.0.+-- This file has been generated from package.yaml by hpack version 0.31.1. -- -- see: https://github.com/sol/hpack --
test/golden/test-files/key/empty-package.yaml.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from empty-package.yaml by hpack version 0.31.0.+-- This file has been generated from empty-package.yaml by hpack version 0.31.1. -- -- see: https://github.com/sol/hpack --
test/golden/test-files/key/import-local/package.yaml.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.31.0.+-- This file has been generated from package.yaml by hpack version 0.31.1. -- -- see: https://github.com/sol/hpack --
test/golden/test-files/key/import-relative/package.yaml.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.31.0.+-- This file has been generated from package.yaml by hpack version 0.31.1. -- -- see: https://github.com/sol/hpack --
test/golden/test-files/key/when-dependencies.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from when-dependencies.dhall by hpack version 0.31.0.+-- This file has been generated from when-dependencies.dhall by hpack version 0.31.1. -- -- see: https://github.com/sol/hpack --
test/golden/test-files/key/when-dependencies.cabal.golden view
@@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from when-dependencies.dhall by hpack version 0.31.0.+-- This file has been generated from when-dependencies.dhall by hpack version 0.31.1. -- -- see: https://github.com/sol/hpack --
test/golden/test-files/key/when-dependencies.dhall.golden view
@@ -1,4 +1,4 @@- let deps = [ "base == 4.*" ]+let deps = [ "base == 4.*" ] in { name = "when-dependencies"
test/golden/test-files/key/when-dependencies.yaml.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from when-dependencies.yaml by hpack version 0.31.0.+-- This file has been generated from when-dependencies.yaml by hpack version 0.31.1. -- -- see: https://github.com/sol/hpack --
test/golden/test-files/real-world/hpack/hpack.yaml.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from hpack.yaml by hpack version 0.31.0.+-- This file has been generated from hpack.yaml by hpack version 0.31.1. -- -- see: https://github.com/sol/hpack --
test/golden/test-files/real-world/stack/stack.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.0 --- This file has been generated from stack.dhall by hpack version 0.31.0.+-- This file has been generated from stack.dhall by hpack version 0.31.1. -- -- see: https://github.com/sol/hpack --
test/golden/test-files/real-world/stack/stack.cabal.golden view
@@ -1,6 +1,6 @@ cabal-version: 2.0 --- This file has been generated from stack.dhall by hpack version 0.31.0.+-- This file has been generated from stack.dhall by hpack version 0.31.1. -- -- see: https://github.com/sol/hpack --
test/golden/test-files/real-world/stack/stack.dhall.golden view
@@ -41,7 +41,7 @@ , "-fwarn-tabs" , "-fwarn-incomplete-uni-patterns" , "-fwarn-incomplete-record-updates"- , "-optP-Wno-nonportable-include-path # workaround [Filename case on macOS \u00B7 Issue #4739 \u00B7 haskell/cabal](https://github.com/haskell/cabal/issues/4739)"+ , "-optP-Wno-nonportable-include-path # workaround [Filename case on macOS · Issue #4739 · haskell/cabal](https://github.com/haskell/cabal/issues/4739)" ] , dependencies = [ "Cabal >= 2.4"
test/golden/test-files/real-world/stack/stack.yaml.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.0 --- This file has been generated from stack.yaml by hpack version 0.31.0.+-- This file has been generated from stack.yaml by hpack version 0.31.1. -- -- see: https://github.com/sol/hpack --