Commit Graph

42 Commits

Author SHA1 Message Date
Simon Jakobi 8d3c4e4250 Allow megaparsec-8 (#1582)
This also officially removes support for megaparsec-6.5 – the
build had been broken before though.
2019-12-03 03:28:06 +00:00
Simon Jakobi 85645a2470 dhall-to-{json,yaml,yaml-ng}: Handle empty maps correctly (#1561)
Fixes #1559.

This requires aeson-yaml >= 1.0.5.0 since older versions
incorrectly encode empty objects.

The raised bound also fixes #1560. A regression test is included.
2019-12-01 18:41:46 +00:00
Simon Jakobi 3b222cda91 Write cache files atomically (#1544)
Fixes https://github.com/dhall-lang/dhall-haskell/issues/1540.
2019-11-22 00:49:46 +00:00
Simon Jakobi dedd5e0ea6
Strip trailing whitespace (#1422)
This raises the lower bound on prettyprinter to 1.5.1 since
`removeTrailingWhitespace` is buggy in earlier versions.

This jailbreaks hnix, which isn't compatible with prettyprinter-1.5.1 yet.

Fixes #183, #1400, #1525. 

Co-authored-by: Gabriel Gonzalez <Gabriel439@gmail.com>
2019-11-14 14:43:35 +01:00
Simon Jakobi cd49b65c23 Move HsYAML-based code to new package dhall-yaml (#1514)
* Shared code for the dhall-to-yaml[-ng] executables stays in dhall-json.
* Shared tests are in dhall-yaml.

Fixes #1435.
2019-11-07 12:11:04 +00:00
Gabriel Gonzalez 7b414d9846
Version 1.26.1 → 1.27.0 (#1428) 2019-10-20 07:00:43 -07:00
Patrick Mylund Nielsen 5087e4d22a
Bump aeson-yaml, and add YAML regression test for 'y' (#1420) 2019-10-15 09:18:21 -04:00
Patrick Mylund Nielsen 96e694d7c6
'gpl' cabal flag to switch between HsYAML and aeson-yaml (#1417) 2019-10-15 03:12:12 -04:00
mujx 645b71d6b3 Functional tests setup for the LSP server (#1396)
* Functional tests setup for the LSP server

* Add nix derivation for lsp-test-0.6.1.0

* Register fixture files

* Enable functional tests on appveyor

* Attempt to fix Position errors

* Fix `dhall-lsp-server` to specify a UTF8 locale

Related to https://github.com/dhall-lang/dhall-haskell/issues/1356#issuecomment-536840612

* Specify utf8 encoding for tests

* Add test for hovering functionality

* Add glob to list fixture files

* Remove extra do
2019-10-10 02:27:15 +00:00
Vijay Tadikamalla cced515494 Migrate to the HsYAML package (#1248) 2019-10-05 14:52:19 -07:00
Simon Jakobi d1d0b3d462 Get rid of some CPP by upgrading to generic-random-1.3 (#1292) 2019-09-08 18:42:22 +00:00
Frederik Ramcke 523861a92c dhall-lsp-server: Upgrade to haskell-lsp 0.15 (#1203)
* Clean up dhall-lsp-server.cabal

Removes unused dependencies.

* Upgrade to haskell-lsp-0.15.0.0

The stackage LTS version is still 0.8.2 so we need to add this as an
'extra-dep'.

* Display type information as plaintext rather than markdown

* Fix nix build

* Update nix haskell-lsp-types
2019-08-07 11:40:43 +00:00
Javier Neira 4d0058b71d Use ghc-8.6.5 in default stack.yaml and make appveyor use it (#1182)
* Make it no buildable in windows as suggested by @sjakobi

* Use last lts resolver for ghc-8.6.5

* Remove unused stack yaml file

* Use default stack yaml
2019-08-01 13:01:16 +00:00
Simon Jakobi 42d80b057d
Include dhall-nix in stack and cabal project configs (#1178)
Note that `dhall-nix` cannot be built on Windows due to its transitive
dependency on the `unix` package.

Also:

* Nix: Enable `-Werror` for `dhall-nix`

* Add support for `toMap` in `dhall-nix`:

    \(x : { a : Bool }) -> toMap x

is translated as

    x:
      (kvs:
        map (k:
          {
            mapKey = k;
            mapValue = builtins.getAttr k kvs;
            }) (builtins.attrNames kvs)) x
2019-07-31 18:24:15 +02:00
Ollie Charles d55bf8f3a3 Add instance Lift (Expr s a) (#1119)
This allows Exprs to be lifted in template-haskell. This is useful to
build a [dhall||] quasiquoter
2019-07-21 12:10:53 -07:00
Gabriel Gonzalez 90b62ee9d7 Replace `dhall-to-text` with `dhall text` subcommand (#1090)
Fixes #1087
2019-07-08 17:18:09 +00:00
Javier Neira 2a37b2e7bf Bump up lower bound of aeson-pretty (#978) 2019-06-01 07:10:38 -07:00
Dmitry Dolgov 07906673af [POC] Add 'quoted' option (#941)
Allow to generare quoted scalars if needed via providing a custom encode
options to Data.Yaml.encodeWith. So far two corner cases from yaml
itself (an empty scalar, and special strings) are omitted in the
implementation.
2019-05-12 07:44:12 -07:00
quasicomputational 4f9defec25 Use MonadFail.fail, not Monad.fail. (#912)
Monad.fail is no more with GHC 8.8, so this is a forced change.
However, it will also work on older GHCs.
2019-05-01 11:22:39 -07:00
Javier Neira 0804689da1 Update tests and include dhall-lsp-server in appveyor (#889) 2019-04-11 16:47:07 -07:00
PanAeon f2f4fc2979 Add dhall-lsp-server (#843) 2019-03-06 21:41:38 -08:00
Javier Neira e8d4b78a3f Build dhall-json with lts-6 in appveyor (#818) 2019-02-15 15:09:35 -08:00
Ville Tirronen 3fbd0d72f8 Add --list flag to dhall resolve (#795)
This commit adds a flag for producing a machine readable listing of
dependencies of a dhall expression.

This flag can be used to integrate dhall more easily to file watchers or
build systems which require such lists of dependencies.
2019-01-28 21:43:37 -08:00
Javier Neira d481f47bed Add eta support and update stack config to lts-13 (#778) 2019-01-11 19:35:39 -08:00
Fabrizio Ferrai b4da467816 Add cborg-json to the stack.yaml (#720)
Fixes #721
2018-11-29 17:18:25 -08:00
Basile Henry 65f5377f0c
Unique dependencies in dot graph (#713)
* Add dotgen to stack.yaml

* Generate strict dot graph (prune redundant connections)
2018-11-26 17:19:02 +01:00
Javier Neira 5db1051311 Update stack/cabal config to sync with new structure (#671)
Also, add build instructions for cabal and stack in alphabetical order
2018-11-06 05:42:23 -08:00
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
quasicomputational fedfa8e41e GHC 8.6 stuff (#623)
This is the first version of repline with GHC 8.6 support, but it
comes with some API changes.
2018-10-05 07:42:54 -07:00
quasicomputational 469f6ddf44
Move to megaparsec version 7.0.0. (#565)
* Move to megaparsec version 7.0.0.

* Add megaparsec.nix
2018-09-11 09:36:57 +01:00
Javier Neira 1d179dff37 Stack support (#535)
* rename previous lts-11 yaml file and add needed extra-deps

* use new lts-12.4

* add import of Data.Monoid.(<>) to make it compilable with base < 4.11 (and stack lts-11)

* add needed extra-deps
2018-08-04 16:37:49 -07:00
Adam Bergmark d9200c0cc4 Upgrade stack snapshot to LTS 11.12 (#447) 2018-06-09 13:28:00 +02:00
Greg Pfeil 607cb6f366 Add non-Haskell dependencies to stack.yaml. (#389)
Not sure if this is a change you’re interested in. IMO, it’s nice for stack
users even if they don’t use Nix, since it makes the dependencies explicit.
2018-05-15 17:56:06 -07:00
Javier Neira 8c0f09fb4d Support for ghc-7.10.3 / lts-6.27 (#340) 2018-04-06 14:39:21 -07:00
Joe Kachmar c87e5d9980 Switches from text-format to formatting (#330) 2018-03-18 22:05:30 -07:00
David Luposchainsky 2adc29aa56 Housekeeping (#293)
* Add explicit Prettyprinter dep to stack.yaml until LTS supports it

* Remove redundant dependencies

Courtesy of Weeder,
https://hackage.haskell.org/package/weeder
2018-02-21 08:47:15 -08:00
Sibi adcae09068 Make it work with Stack (#144)
prettyprinter doesn't match on lts-9.0. You get the following error
with stack:

```
Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for dhall-1.6.0:
    prettyprinter-1.1 must match >=1.1.1 && <1.2 (latest applicable is 1.1.1)
needed since dhall-1.6.0 is a build target.
```
2017-09-28 10:25:16 -07:00
Gabriel Gonzalez 6947b05a9c Fix `dhall` to build against Stackage `lts-9.0` 2017-08-02 20:05:26 -07:00
Gabriel Gonzalez d393963888 Simplify command line interface and add `--explain` 2016-11-04 21:41:47 -07:00
Gabriel Gonzalez 427ef73846 Update to newer Stackage resolver 2016-10-20 09:27:47 -07:00
Gabriel Gonzalez 36c6a28da6 Switch to a newer `stack` resolver 2016-09-09 09:15:27 -07:00
Gabriel Gonzalez 9a6ee13cd0 Initial commit 2016-09-07 09:17:12 -07:00