Commit Graph

39 Commits

Author SHA1 Message Date
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
Gabriel Gonzalez
afb645faa5 Version 1.4.1 => 1.4.2 2017-06-17 13:32:19 -07:00
Gabriel Gonzalez
51f05ca422 Version 1.4.0 => 1.4.1 2017-06-17 13:13:42 -07:00
Gabriel Gonzalez
a744bd0b6b Version 1.3.0 => 1.4.0 2017-06-17 12:36:12 -07:00
Gabriel Gonzalez
45a7f8cbb7 Add support for additional headers for URL imports. Fixes #45 (#71)
Users can now supply additional headers for URL imports using the new `using`
keyword, like this:

```haskell
http://example.com using ./headers
```

... where `./headers` must be a value of type:

```haskell
{ header : Text, value : Text }
```

The argument to `using` must be an import (such as a file, URL, or env import)
and cannot be an inline Dhall expression.  There are two reasons why:

* The header expression is resolved, type-checked, and normalized in a separate
  phase preceding the import of the corresponding URL so it does not have access
  to bound variables in scop
* This restriction greatly simplifies the implementation

Also, headers are automatically forwarded to relative imports, so if you import a
URL like this:

```haskell
http://example.com using ./headers
```

... and that serves a file like:

```haskell
./foo
```

... then Dhall will import `http://example.com/foo` using the same `./headers`.
2017-06-17 07:14:37 -07:00
Gabriel Gonzalez
e06791c6c1 Update default.nix 2017-05-17 09:04:42 -07:00
Gabriel Gonzalez
e0319ecaa5 Forbid additional characters from paths (#58)
This reduces the number of situations where users have to end a path
with a space
2017-05-16 09:17:19 -07:00
Gabriel Gonzalez
4b8d8438ea Update default.nix 2017-04-29 14:46:07 -07:00
Gabriel Gonzalez
c54353c3ee Replace microlens* dependencies with lens. Fixes #20
`trifecta` already depends on `lens`, so using `microlens` does not
actually trim down the dependency tree.  Quite the opposite: it adds two
unnecessary dependencies.
2017-01-29 14:44:09 -08:00
Gabriel Gonzalez
56365164ca Add Nix derivations for building Dhall 2016-12-19 20:27:15 -08:00