e931451a2b
This causes text literals to be formatted as multi-line strings whenever they contain at least one newline and at least one non-newline character. "Spacers" like `"\n\n"` continue be formatted as single-line strings. If the heuristic turns out to be too eager to choose a multi-line layout, we can refine it later. This partially addresses #1496. Also * update some variable names * use 80-column "smart" layout consistently |
||
---|---|---|
.. | ||
dhall-to-json | ||
dhall-to-yaml | ||
examples | ||
json-to-dhall | ||
src/Dhall | ||
tasty | ||
yaml-to-dhall | ||
.gitignore | ||
CHANGELOG.md | ||
LICENSE.BSD3 | ||
LICENSE.GPLv3 | ||
README.md | ||
Setup.hs | ||
default.nix | ||
dhall-json.cabal | ||
release.nix | ||
shell.nix |
README.md
dhall-json
For installation or development instructions, see:
Full documentation here:
Introduction
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
Example
$ dhall-to-json <<< "{ foo = 1, bar = True }"
{"foo":1,"bar":true}
$ dhall-to-json <<< "List/head Natural ([] : List Natural)"
null
$ dhall-to-yaml <<< "{ foo = [1, 2, 3], bar = { baz = True } }"
foo:
- 1
- 2
- 3
bar:
baz: true