Commit Graph

59 Commits

Author SHA1 Message Date
Gabriel Gonzalez 90b62ee9d7 Replace `dhall-to-text` with `dhall text` subcommand (#1090)
Fixes #1087
2019-07-08 17:18:09 +00:00
Gabriel Gonzalez f4542d5bc5
Integrate `dhall-nix` into CI (#887) 2019-04-11 09:16:43 -07:00
Gabriel Gonzalez f703d271b6
Add Nix support for `dhall-lsp-server` project (#849) 2019-03-10 09:43:44 -07:00
Gabriel Gonzalez bebfbf2a5a
Change `default.nix` to use static linking when possible (#786)
Fixes https://github.com/dhall-lang/dhall-haskell/issues/783

... as suggested by @PierreR in https://github.com/dhall-lang/dhall-haskell/issues/783#issuecomment-455502506
2019-01-19 09:36:47 -08:00
Gabriel Gonzalez 2635c582eb
Add contributing instructions for the website (#760)
This is so that I can link people to the `README` if they are interested in
improving the site
2018-12-20 10:36:10 -08:00
Gabriel Gonzalez 21d70b3383
Restrict `try-dhall` build to Linux (#756) 2018-12-14 18:50:21 -08:00
Gabriel Gonzalez 615eccb10d
Expand main page with high-level reasons to adopt Dhall (#754)
This adds four new sections to the page after the live demo which highlight
the common themes that I notice people use when communicating the value of
Dhall to others on social media:

* The first section emphasizes the element of delight in using the language for
  people who are into elegance and quality

* The second section focuses on more pragmatic people who are sick of YAML and
  just want a reasonable alternative that they can convince their manager to
  adopt

* The third section appeals to the LangSec crowd that wants an uncompromising
  and secure foundation for what they are buliding

* The last section targeted at the skeptic who thinks that Dhall is an ivory
  tower language not suited for real-world problems.

The second crowd (YAML emigrants) is the audience that I'm targeting the
most strongly at the moment, but I didn't want to lead with a negative reason
adopt by focusing on the limitations of YAML, so I put the section on delight
first so that we could start with a more positive tone.
2018-12-13 06:44:33 -08:00
Gabriel Gonzalez 82165d525d
Remove the `try-dhall-server` build product (#752)
This build product is no longer necessary now that the live demo can import
things from the Prelude
2018-12-11 05:20:54 -08:00
Gabriel Gonzalez cf69f5a953
Add "Try Dhall" project (#739)
This adds three new Nix build products:

* `try-dhall-static` - The static assets for "Try Dhall"
* `try-dhall-server` - A script which serves the static assets for local
   debugging
* `tarball-try-dhall` - A tarball of the static assets

This is powered by a new small `dhall-try` package which is also included
in this change.
2018-12-06 18:00:03 -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
Gabriel Gonzalez 01d6cad27f
Update `README` and Nix logic (#650)
Fixes https://github.com/dhall-lang/dhall-haskell/issues/645

Fixes https://github.com/dhall-lang/dhall-lang/issues/216

This updates the `README` with the following changes:

* Points to the language-agnostic `README` in the `dhall-lang` repository
* Retains only Haskell-specific sections of interest
* Removes the embedded LICENSE now that GitHub auto-recognizes the project
  license (#644)
* Changes the Quick Start instructions to use Nix
* Adds instructions for project development using Nix

The latter two points entailed refactors to the Nix logic to simplify the
user experience:

* `default.nix` was moved to `shared.nix` and replaced with a new `default.nix`
  that works out-of-the-box with `nix-build`
* There is a new `nix/test-dhall.nix` which users can use to create a
  `nix-shell` with Dhall as a dependency
2018-10-20 09:27:16 -07:00
Gabriel Gonzalez f3a372c99a
Build against GHC 7.10.3 (#621)
... as requested by @jneira so that Dhall will continue to work as a
dependency of Eta, which is built using GHC 7.10.3

This adds CI support for testing the build against GHC 7.10.3 and also
fixes issues building against that GHC version that were caught in the process
2018-10-05 20:51:18 -07:00
Gabriel Gonzalez aca63b4a6d
Use `pkgs.haskell.lib.packagesFromDirectory` (#577)
`readDirectory` was upstreamed into `nixpkgs` as `packagesFromDirectory`
and now that we are on a new enough revision of `nixpkgs` we can
`packagesFromDirectory`
2018-09-16 10:01:42 -07:00
Gabriel Gonzalez e4145ce192
Add coverage testing (#569) 2018-09-09 16:25:10 -07:00
Gabriel Gonzalez f134bbc765
Fix Nix build (#545)
The haskell package overrides section of `overlayDynamic` was shadowing
the corresponding overrides in `overlayShared`.  This change fixes that
so that they correctly stack.
2018-08-17 16:45:28 -05:00
Gabriel Gonzalez 5ac99844fb
Build inside of source directory produced by `cabal sdist` (#543)
This ensures that we don't accidentally forget to package data files
when uploading to Hackage to prevent build failures
2018-08-12 09:17:28 -05:00
Gabriel Gonzalez dc836e5ddb
Serialization support (#519)
... as standardized in https://github.com/dhall-lang/dhall-lang/pull/194

This also changes the hashing algorithm to use a has of the serialized form
instead of the pretty-printed form
2018-07-30 10:19:41 -07:00
Gabriel Gonzalez 21dc7b898d
Fix predicate for filtering source directory (#520)
This helps prevent wasteful rebuilds in CI
2018-07-23 08:48:09 -07:00
Gabriel Gonzalez 1adafa0502
Build a completely static Dhall executable in CI (#517)
This adds a new `dhall-static` target that builds a fully static `dhall`
executable that can be run on any Linux machine (i.e. it is a relocatable
executable that is completely dependency free).  That in turns implies
that even though it is built with Nix it doesn't require that the user
installs Nix to run it (i.e. no dependency on the `/nix/store` or a
Nix installer).  Just copy the standalone executable to any Linux  machine
and it's good to go.

This based on the following work of @nh2:

* https://github.com/NixOS/nixpkgs/issues/43795
* https://github.com/dhall-lang/dhall-lang/issues/192#issuecomment-406134451

This also bumps the version of `nixpkgs` used for the normal (non-static)
Dhall build to be the closest revision on `nixpkgs` `master` as the one
used by @nh2 in his work.  Once that work is merged into `nixpkgs` `master`
then both builds can use the same revision from `nixpkgs` `master`.
2018-07-21 22:11:57 -07:00
Gabriel Gonzalez f17697b242
Use `readDirectory` to simplify bumping dependencies (#501)
This comes in handy when testing Stackage-related bumps to upper bounds
2018-07-04 20:48:48 -07:00
Fintan Halpenny 6f626c96bc
Add Benchmarking (#415)
* Benchmark Prelude files

* Add issue 108 example

* Some cleaning up

* Remove printing of files

* Add bounds

* Clean cabal formatting

* Add benchmark examples to extra source files

* Add Nix support for benchmarks

* This doesn't (yet) run or build the benchmarks in CI due to the long time
to execute all of them, but this does add them to the `shell.nix` so that
they can be run using local development
2018-06-01 11:39:30 -06:00
Gabriel Gonzalez c635f1f77b
Pin `nixpkgs` (#372)
This pins `nixpkgs` to a recent revision from the `release-18.03`
2018-04-30 08:40:29 -07:00
Gabriel Gonzalez 3fb4d0e758
Version 1.12.0 → 1.13.0 (#368) 2018-04-28 07:51:15 -07:00
Gabriel Gonzalez a0a2ac12eb
Remove unused `base16-bytestring` dependency (#355) 2018-04-08 20:32:56 -07:00
Oliver Charles 922e20e6ab Replace trifecta with megaparsec (#268)
The long-term motivation for this change is so that we can eventually use a
separate `attoparsec`-based lexing step to greatly increase parsing speed since
the `trifecta`/`parsers` API doesn't allow tokens other than `Char`.

The secondary motivation for this is that `megaparsec` is a smaller dependency
that is more actively maintained.
2018-03-27 09:09:20 -07:00
Gabriel Gonzalez 7d7b8590b5
Version 1.11.1 → 1.12.0 (#334) 2018-03-24 09:51:45 -07:00
Joe Kachmar c87e5d9980 Switches from text-format to formatting (#330) 2018-03-18 22:05:30 -07:00
Gabriel Gonzalez 4a085aa3d6
Version 1.11.0 → 1.11.1 (#323) 2018-03-12 11:09:54 -07:00
Gabriel Gonzalez ab436c78ca
Version 1.10.0 → 1.11.0 (#318) 2018-03-08 20:24:13 -08:00
Pi3r 5d2012927a Replace cryptohash with cryptonite (#313)
Fixes #305
2018-03-01 07:32:20 -08:00
Gabriel Gonzalez 78b91b8534
Version 1.9.1 → 1.10.0 (#288) 2018-02-23 19:54:58 -08:00
Gabriel Gonzalez be7a5771ea
Use the latest `prettyprinter` library (#287)
This fixes the root cause of e24b3d90fa so
that we no longer need the workaround of using `Pretty.Text.renderIO`
2018-02-19 11:05:11 -08:00
Oliver Charles 7f29209ffd Add dhalli, an interactive REPL for Dhall (#266)
This commit introduces dhalli, a fairly minimal Dhall REPL that supports:

* Evalution of Dhall expressions along with import resolution
* Type inspection of abritrary expressions
* Syntax highlighting and pretty printing for output
* Persistent bindings with :let
* Expression lookup with an implicit "it" binding
2018-02-16 07:22:24 -08:00
Oliver Charles a6891fab9c Add semantic annotations to the pretty printer (#260) 2018-02-15 10:36:05 -08:00
Gabriel Gonzalez 0091b09183
Add support for `Scientific` (#256)
Fixes https://github.com/dhall-lang/dhall-lang/issues/86

This change has two benefits:

* Users of the Haskell API can now marshal Dhall values of type `Double` into
  Haskell values of type `Scientific`
* The `dhall` executable no longer loses precision when dealing with
  values that have a large exponent (see the newly added test)
2018-02-08 07:24:12 -08:00
Gabriel Gonzalez 067ff6d939
`dhall-format` now preserves the order of fields (#246)
Related to #244

This updates Dhall's syntax tree to use an insert-ordered hashmap to store
record fields and union alternatives.  This in turn implies that they will be
formatted in the same order that they were originally parsed.

This is a breaking change to the API due to changing the type of map used in the
syntax tree.
2018-02-01 21:16:24 -08:00
Gabriel Gonzalez 80c4397307
Version 1.9.0 → 1.9.1 (#241) 2018-02-01 08:21:55 -08:00
Gabriel Gonzalez 5fa4fae85a
Use `lens-family-core` instead of `lens` (#238)
Related to https://github.com/fpco/stackage/issues/3238

The immediate motivation of this change is to fix the upper bound issue
linked above.  However, since we don't need the full `lens` dependency
this uses the much smaller and more stable `lens-family-core` library.  Besides
reducing the footprint of the `dhall` executable this should hopefully also
reduce the number times we need to update the upper bound.
2018-01-29 09:28:20 -08:00
Gabriel Gonzalez c24b6a4ad6
Version 1.8.2 → 1.9.0 (#224) 2018-01-27 11:52:46 -08:00
Gabriel Gonzalez 10c508391b
Version 1.8.1 → 1.8.2 (#192) 2017-12-14 14:33:53 -08:00
Gabriel Gonzalez 0098a90650 Version 1.8.0 → 1.8.1 2017-12-01 18:38:14 -08:00
Gabriel Gonzalez b6ca7d22f0
Version 1.7.0 → 1.8.0 (#173) 2017-11-03 20:22:43 -07:00
Gabriel Gonzalez 70276b82fb Add support for SHA-256 integrity checks on imports (#166)
Related to #162

You can now add `sha256:XXX...XXX` after any import to verify that the import
has the expected hash.  This allows you to purify import code and protect the
code against malicious modifications

This is analogous to an IPFS-style import except that the hash is verified
directly by the interpreter instead of trusting that the IPFS URL has not been
compromised
2017-10-23 17:51:10 +03:00
Gabriel Gonzalez ebc884226d Version 1.6.0 → 1.7.0 (#160) 2017-10-10 20:25:19 +03:00
Gabriel Gonzalez 5f7d46b179 Add `dhall-format` executable (#137)
Fixes https://github.com/dhall-lang/dhall-lang/issues/8

This takes a Dhall expression on standard input and outputs the same
expression to standard output except pretty-printed in a standard format
2017-09-17 08:18:15 -07:00
Gabriel Gonzalez ee6bb3d7c1 Version 1.5.1 => 1.6.0 2017-09-02 10:01:20 -07:00
Gabriel Gonzalez 3b357aa806 Version 1.5.0 => 1.5.1 2017-08-02 20:07:27 -07:00
Gabriel Gonzalez 12ad893605 Version 1.4.2 => 1.5.0 2017-07-25 20:11:53 -07:00
Gabriel Gonzalez 8b3ebbc832 Remove use of Template Haskell. Fixes #89
This replaces all uses of `NeatInterpolation` with either multi-line
strings or `unlines`.  This allows Dhall to be compiled without using
Template Haskell, which in turn enables cross-compilation
2017-07-25 19:51:40 -07:00
Gabriel Gonzalez fae3232480 Add support for marshaling simple Dhall functions to Haskell functions (#88) 2017-07-22 04:53:24 -07:00