dhall-haskell/dhall-json
Gabriel Gonzalez aecfbc9acc
Migrate dhall-{bash,json,text} into this repository (#661)
The motivation for this change is:

* To catch build failures in downstream packages whenever we make a breaking
  change to the `dhall` API
* To reduce the amount of work I need in order to cut a release for all of
  these packages
* To better share Nix/CI-related logic between the projects

Note that I have not yet migrated `dhall-nix` in.  I'm waiting for
https://github.com/dhall-lang/dhall-nix/issues/17 to be fixed since
`dhall-nix` is incompatible with later versions of `megaparsec` due to
`hnix`.
2018-10-28 17:32:51 -07:00
..
dhall-to-json Migrate dhall-{bash,json,text} into this repository (#661) 2018-10-28 17:32:51 -07:00
dhall-to-yaml Migrate dhall-{bash,json,text} into this repository (#661) 2018-10-28 17:32:51 -07:00
examples Migrate dhall-{bash,json,text} into this repository (#661) 2018-10-28 17:32:51 -07:00
src/Dhall Migrate dhall-{bash,json,text} into this repository (#661) 2018-10-28 17:32:51 -07:00
tasty Migrate dhall-{bash,json,text} into this repository (#661) 2018-10-28 17:32:51 -07:00
.gitignore Migrate dhall-{bash,json,text} into this repository (#661) 2018-10-28 17:32:51 -07:00
cabal.project Migrate dhall-{bash,json,text} into this repository (#661) 2018-10-28 17:32:51 -07:00
CHANGELOG.md Migrate dhall-{bash,json,text} into this repository (#661) 2018-10-28 17:32:51 -07:00
default.nix Migrate dhall-{bash,json,text} into this repository (#661) 2018-10-28 17:32:51 -07:00
dhall-json.cabal Migrate dhall-{bash,json,text} into this repository (#661) 2018-10-28 17:32:51 -07:00
LICENSE Migrate dhall-{bash,json,text} into this repository (#661) 2018-10-28 17:32:51 -07:00
README.md Migrate dhall-{bash,json,text} into this repository (#661) 2018-10-28 17:32:51 -07:00
release.nix Migrate dhall-{bash,json,text} into this repository (#661) 2018-10-28 17:32:51 -07:00
Setup.hs Migrate dhall-{bash,json,text} into this repository (#661) 2018-10-28 17:32:51 -07:00
shell.nix Migrate dhall-{bash,json,text} into this repository (#661) 2018-10-28 17:32:51 -07:00
stack.yaml Migrate dhall-{bash,json,text} into this repository (#661) 2018-10-28 17:32:51 -07:00

dhall-json 1.2.4

Hackage

This dhall-json package provides a Dhall to JSON compiler and a Dhall to YAML compiler. The reason this package is called dhall-json is that the Haskell yaml library uses the same data structure as Haskell's aeson library for JSON

Quick start

If you have Nix installed then you can build and run this package using:

$ nix-build
$ result/bin/dhall-to-json <<< "{ foo = 1, bar = True }"
{"foo":1,"bar":true}
$ result/bin/dhall-to-json <<< "List/head Integer ([] : List Integer)"
null
$ result/bin/dhall-to-yaml <<< "{ foo = [1, 2, 3] : List Integer, bar = { baz = True } }"
foo:
- 1
- 2
- 3
bar:
  baz: true