Commit Graph

8 Commits

Author SHA1 Message Date
Simon Jakobi
e931451a2b Format more text literals as multi-line strings (#1508)
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
2019-11-04 03:31:49 +00:00
Simon Jakobi
23910e70e3 dhall-json: Add --output options (#1304)
As requested in #1303.
2019-09-11 06:05:19 +00:00
Gabriel Gonzalez
d66d1db33f Fix --version flag handling for dhall-json package (#1199)
* Fix `--version` flag handling for `dhall-json` package

Fixes https://github.com/dhall-lang/dhall-haskell/issues/1198

This changes version to be a separate constructor for options parsing,
in order to make invalid states unrepresentable and to fix issues like
the above one.

* Undo `allowImports` changed

This was a change I forgot to stash while working on the fix for the
`--version` flag

* Fix missing `Paths_dhall_json` in `dhall-json.cabal`
2019-08-06 06:28:46 +00:00
Gabriel Gonzalez
354346be91 Pretty-print output of {json,yaml}-to-dhall (#1150)
This enables syntax highlighting and formatted output for these two
programs
2019-07-24 13:33:41 +00:00
Gabriel Gonzalez
1a27cad137 Add --file option to dhall-json executables (#1107)
* Add `--file` option to `dhall-json` executables

Fixes https://github.com/dhall-lang/dhall-haskell/issues/1096

* s/JSON/expression/

... as caught by @sjakobi

Co-Authored-By: Simon Jakobi <simon.jakobi@gmail.com>

* s/expression/YAML expression/

... as caught by @sjakobi

Co-Authored-By: Simon Jakobi <simon.jakobi@gmail.com>

* Change the program descriptions for `{json,yaml}-to-dhall`

... as suggested by @sjakobi
2019-07-18 19:08:47 +00:00
Robbie McMichael
6ec28cda27 Use json-to-dhall to implement yaml-to-dhall (#977) 2019-05-30 08:54:35 -07:00
Javier Neira
91f3cae1bf Add json-to-dhall to appveyor artifacts (#894)
* Add json-to-dhall to dhall-json artifact

* Make json-to-dhall buildable with ghc-7.10

* Remove commented buildable field

* Remove unused import Semigroup
2019-04-16 12:52:55 +02:00
antislava
c52ae96a0b
json-to-dhall initial implementation (#884)
* Initial draft of the json-to-dhall tool

* Homogenous JSON maps -> Dhall association lists. Bower example.

* Default conversion options. Ghci examples in function annotations.

* Added type signature to text color highlighting functions (error
reporing)

* Removed TypeApplications extension

* Explicit semigroups

* Disable ghc < 8.0 build

* Type specifications for 'None's (e.g. None Integer instead of just None)

* New style for unions, e.g.: < Left : Text | Right : Integer >.Right +1
2019-04-15 01:21:38 +02:00