Skip to content
Branch: master
Commits on Jun 22, 2019
  1. Fix type-inference rule for projection by type (#597)

    Gabriel439 committed Jun 22, 2019
    Fixes #590
  2. Fix mistake in `let` type-checking documentation (#596)

    Gabriel439 committed Jun 22, 2019
    The documentation explaining how to type-check `let` expressions
    was written before we switched the syntax for `Integer`s and
    `Natural` numbers in #141,
    so this change brings it up to date.
Commits on Jun 20, 2019
  1. Prelude: Add standard representation for weakly-typed JSON values (#586)

    Gabriel439 committed Jun 20, 2019
    This adds a new `JSON` type for representing unstructured JSON data
    in Dhall.
    The goal is to provide a way for users to have a way to pass through
    unstructured data when integrating tools that have schema-free subsets
    of their APIs.  An example of this is "pass-through" API fields which pass
    through arbitrary JSON data without interpreting that data in any way.
    For people familiar with Haskell, this newly-added JSON type is the Dhall
    analog of `Data.Aeson.Value`.
    This will be paired with a matching change to the `dhall-json` package
    to recognize this type and support converting it back and forth to
Commits on Jun 11, 2019
  1. Add support for braced escape sequences (#580)

    Gabriel439 committed Jun 11, 2019
    Related to #577
Commits on Jun 5, 2019
  1. Update `` (#578)

    Gabriel439 committed Jun 5, 2019
    ... to point to v8.0.0
Commits on Jun 4, 2019
  1. Add `Map` type and utility functions to Prelude (#575)

    Gabriel439 committed Jun 4, 2019
    ... as suggested in #557 (comment)
  2. Update NixOps specification (#576)

    Gabriel439 committed Jun 4, 2019
    The main changes are:
    * Fix the Discourse service to correctly check out older revisions
    * Update to a recent revision of the `dhall-haskell`
    * Add a `` subdomain that implementations can use
      for testing custom header forwarding
  3. Clarify how semantic integrity checks work for `as Text` (#574)

    Gabriel439 committed Jun 4, 2019
    Fixes #567
  4. Lint Prelude (#571)

    Gabriel439 committed Jun 4, 2019
    Fixes #563
    This change does a few things:
    * First, this fixes the hashes in the Prelude
    * Second, this adds CI support for keeping the hashes in sync with a
      specific revision of the Haskell Dhall implementation
    * Third, this adds a `./script/` script for regenerating
      the expected hashes for convenience
    * Update `dhall-haskell` reference
Commits on Jun 3, 2019
  1. Version 7.0.0 → 8.0.0 (#564)

    Gabriel439 committed Jun 3, 2019
Commits on May 31, 2019
  1. Standardize support for header forwarding and inline headers (#560)

    Gabriel439 committed May 31, 2019
    The immediate motivation for this change was the following issue against
    the Haskell implementation:
    ... which unearthed two problems:
    * First, I realized that I had not yet standardized the Haskell implementation's
      support for forwarding custom headers
      This is a feature that allows transitive imports to the same domain to
      reuse headers (mainly to reuse authentication headers).  This comes in handy
      when importing from private expression repositories that contain internal
    * Second, I learned why the Haskell support for forwarding headers was broken
      The issue was that custom headers were being forwarded by a (referentially
      opaque) reference instead of being forwarded by value.
      Fixing this requires generalizing the `using` clause for custom headers to
      be able to store an arbitrary expression so that it could store the
      fully resolved and normalized headers.
    So this change bundles two logical changes:
    * Generalizing `using` to store an inline expression
      This is a useful change in its own right because now users can specify
      custom headers inline within the same file instead of having to provide them
      in a separate file.
      This is not a breaking change to the grammar, but it is a minor breaking
      change to the binary encoding.  Specifically, the expression for custom
      headers will now be encoded as an expression and not an import, meaning
      that it is now wrapped in an extra `[24, ... ]` label that was previously not
      there before.
      This doesn't affect semantic integrity checks since the hashed expressions are
      import free.
    * Adding support for header forwarding if the parent/child import share the
      same authority and both use HTTPS
      I thought I had already standardized this, but apparently not! 🙂
      This forwards them by value instead of by reference in order to avoid
      introducing the bug caught by the linked issue.
Commits on May 30, 2019
  1. Fix tests multi-line strings with leading tabs (#565)

    Gabriel439 committed May 30, 2019
    I believe that I ran across a bug in parsing test for `largeExpressionA.dhall`.
    Specifically, that test was encoding the final multi-line string literal
    to including the leading tabs, even though the standard specifies that
    they should be stripped as part of dedenting the strings.
    Specifically, the CBOR encoding said to encode the multi-line string as:
    [18, "\n\t\t\t\t\t\t\t\t\t\t\t\t  "]
    ... when it should have been:
    [18, "\n"]
    However, I actually didn't expect there to be leading tabs in this
    expression in the first place, so rather than just update the encoding I
    instead reformatted the expression and created a separate test focused
    on just testing support for dedenting leading tabs correctly.
Commits on May 24, 2019
  1. Upstream regression test (#559)

    Gabriel439 committed May 24, 2019
    This upstreams a regression test for a silly bug in the Haskell implementation
    See: dhall-lang/dhall-haskell#959
Commits on May 4, 2019
  1. Simplify bare interpolations (#515)

    Gabriel439 committed May 4, 2019
    Fixes #505
    This upstreams a feature of the Haskell implementation to simplify
    interpolated expressions if they are the sole contents of the `Text`
    In other words, an expression of the form `"${e}"` simplifies further
    to just `e`, even if `e` is a bound variable.
Commits on Apr 29, 2019
  1. Use ASCII names for standard files and test directories (#510)

    Gabriel439 committed Apr 29, 2019
    This is to aid people who edit the files from the command line and need to
    explicitly type out the names
Commits on Apr 18, 2019
  1. Update websites (#491)

    Gabriel439 committed Apr 18, 2019
    * Fix e-mail support for ``
    * Add Ruby as official integration
Commits on Apr 14, 2019
  1. Languages can decide how to marshal Dhall expressions (#474)

    Gabriel439 committed Apr 14, 2019
    Fixes #461
    This clarifies that the standard does not cover how to marshal Dhall
    expressions, leaving it up to each implementation to figure out how to do so.
Commits on Apr 12, 2019
  1. Clarify when handler needs to be a function (#473)

    Gabriel439 committed Apr 12, 2019
    Fixes #472
Commits on Mar 26, 2019
  1. Fix parsing test for large expression (#445)

    Gabriel439 committed Mar 26, 2019
    ... as part of #438 I
    mistakenly changed the large expression binary test result, even though it
    did not need to be changed.  I don't remember exactly what confusion of events
    led to me to computing the wrong golden test result while working on that
    This change reverts it back to where it was before.
Commits on Mar 25, 2019
  1. Add support for union alternatives without fields (#438)

    Gabriel439 committed Mar 25, 2019
    Fixes #224
    This adds support for unions with empty alternatives that don't store any
    values.  In the simple case where the union has all empty alternatives it
    degenerates to an enum.
    For example:
    let Role = < Wizard | Fighter | Rogue >
    let show : Role → Text
        show =
            λ(x : Role)
          → merge { Wizard = "Wizard", Fighter = "Fighter", Rogue = "Rogue" } x
    in  show Role.Wizard
    However, these empty alternatives can be mixed with non-empty alternatives, too,
    with handlers to match:
    let Status = < Empty | NonEmpty : Text >
    let concatSep
        : ∀(separator : Text) → ∀(elements : List Text) → Text
        =   λ(separator : Text)
          → λ(elements : List Text)
          → let status =
                  (   λ(element : Text)
                    → λ(status : Status)
                    → merge
                      { Empty = Status.NonEmpty element
                      , NonEmpty =
                            λ(result : Text)
                          → Status.NonEmpty (element ++ separator ++ result)
            in  merge
                { Empty = "", NonEmpty = λ(result : Text) → result }
    in  concatSep
    Handlers for empty alternatives no longer have to bind unused arguments  of
    type `{}` and constructors for empty alternatives no longer have to take
    an input of `{=}`.
Commits on Mar 17, 2019
  1. Fix encoding of `largeExpression` parser test case (#431)

    Gabriel439 committed Mar 17, 2019
    The binary encoding specifies that curried function application needs to
    be stored in an uncurried form:
    ... however there was a bug in the Haskell implementation used to
    generate the reference `.dhallb` files where it was not correctly uncurrying
    function applications.  See:
    ... as a result, one of the files was encoded incorrectly, which this
    change fixes
Commits on Mar 16, 2019
  1. Update `{prelude.,}` (#429)

    Gabriel439 committed Mar 16, 2019
  2. Make self-caching Prelude (#424)

    Gabriel439 committed Mar 16, 2019
    Fixes #419
    This adds semantic integrity checks to the Prelude's internal references so that
    even if users don't cache their Prelude package imports the Prelude will
    internally cache all imports after the root import for the user.
Commits on Mar 14, 2019
  1. Remove support for fragment identifiers (#406)

    Gabriel439 committed Mar 14, 2019
    Fixes #403
    @singpolyma noted that fragment identifiers are not useful for remote imports
    * They don't affect import resolution because:
        * They are not used to resolve the host
        * They are not transmitted to the host as part of the path to fetch
        * More generally, fragments are required by
          [RFC 3986]( to be
          interpreted client-side (if at all)
    * They don't identify any "sub-section" of a Dhall expression to fetch
    Therefore, we can omit support for them in the grammar and the binary encoding
    This is a breaking change to the binary encoding, although this does not
    affect semantic integrity checks because they are fully resolved and
    therefore don't include imports.
Commits on Mar 13, 2019
  1. Protect transitive remote imports with CORS check (#411)

    Gabriel439 committed Mar 13, 2019
    Fixes #404
    This change protects against
    [server-side request forgery](
    by preventing remote imports from importing transitive remote imports that
    do not explicitly opt in via CORS.
    For example, a simple way to exploit an AWS EC2 instance before this change is
    to ask the instance to interpret ``, where:
    * `` imports ` using`
    * `` contains
      [ { header = "Credentials"
        , value = as Text
    This change would reject the import of `` because the
    response would not include an `Access-Control-Allow-Origin` header permitting
    itself to be transitively imported.
    Similarly, this change would protect against an external internet import from
    triggering an interpreter request against a potentially sensitive intranet
    endpoint unless that intranet endpoint had enabled CORS whitelisting that
    external domain.
    This change will not break the most common use of transitive imports: a Dhall
    package that transitively depends on the Prelude.  ``
    already enables CORS.
    This technically only standardizes a highly-simplified subset of CORS.  Because
    Dhall only uses the `GET` method to import remote expressions there is no need
    to preflight the import with an `OPTIONS` request.
Commits on Mar 12, 2019
  1. Add `` configuration (#417)

    Gabriel439 committed Mar 12, 2019
    This also includes an SMTP server for `` necessary to
    send activation e-mails.  This currently just has one account for
  2. Update normalization tests (#415)

    Gabriel439 committed Mar 12, 2019
    Fixes #413
    This updates the normalization tests so that the `*B.dhall` files match the
    output of the Haskell implementation.
    In some cases this just changes the format of the file, but in other cases
    this detects a case where the `*B.dhall` file was not in normal form.
Commits on Mar 8, 2019
  1. Expand character set for quoted labels (#408)

    Gabriel439 committed Mar 8, 2019
    This expands quoted labels to permit all non-control ASCII characters except
    One motivation for this is that I would like to eventually standardize support
    for automatically converting nullary union alternatives to `Text`, but that
    in turn requires expanding the set of valid alternative names.
    A second motivation for this is to expand the set of field names that Dhall
    can generate when targeting JSON/YAML configurations.
  2. Fix decoding of imports (#405)

    Gabriel439 committed Mar 8, 2019
    Fixes #402
    ... as caught by @singpolyma
    This fixes the decoding logic for imports to match the encoding logic.
    The decoding logic was missing an expected `null` field when a URL import
    had no custom headers.
  3. Clarify how to decode variables named `_` (#407)

    Gabriel439 committed Mar 8, 2019
    Fixes #400
    @singpolyma noted that the standard is inconsistent about whether or not
    decoders should enforce that all variables named `_` were correctly encoded.
    This changes the encoding logic to be consistently strict on this point.
Commits on Mar 5, 2019
  1. Version 5.0.0 → 6.0.0 (#383)

    Gabriel439 committed Mar 5, 2019
Commits on Mar 2, 2019
  1. Simplify import resolution judgment (#391)

    Gabriel439 committed Mar 2, 2019
    I realized that there was redundant information being threaded through
    the import resolution judgment.  Specifically the `@ here` import always
    matched the last import in the history of visited imports, so there is
    no need to keep track of it separately from the history.
    This change removes that redundancy by eliminating the `@ here` component
    of the import resolution judgment and instead pattern matching on the
    "head" of the non-empty set of visited imports to obtain the same import.
Commits on Feb 28, 2019
  1. Remove `constructors` keyword (#385)

    Gabriel439 committed Feb 28, 2019
    This represents phase 3 of removing the `constructors` keyword from the
    language.  See:
    * [Migration: Deprecation of constructors keyword](
Commits on Feb 26, 2019
  1. Update README introduction (#386)

    Gabriel439 committed Feb 26, 2019
    This updates the README to mention `` and to
    also incorporate the new emphasis around displacing YAML.
    Fixes #196
Commits on Feb 22, 2019
  1. Fix judgment for shifting contexts (#369)

    Gabriel439 committed Feb 22, 2019
    Fixes #367
    The judgment mistakenly implies that the variable being shifted must
    match each variable in the context.  This fixes the judgment to use
    different variable names to avoid confusion.
You can’t perform that action at this time.