Skip to content
Permalink
Branch: master
Commits on Apr 14, 2019
  1. Shuffle comment parsing rules to make it easier to patch for ambiguity (

    f-f committed Apr 14, 2019
    #482)
    
    This allows to remove ambiguity with negative-lookahead, e.g. with this rule:
    
    block-comment-continue =
        "-}"
        / block-comment block-comment-continue
        / !"{-" block-comment-char block-comment-continue
  2. Add more failures to the triggers of the `?` operator fallback (#481)

    f-f committed Apr 14, 2019
    As we identified in #480, the standard was underspecified on this
Commits on Apr 13, 2019
  1. Update hashes for Prelude functions that started using empty alternat…

    f-f committed Apr 13, 2019
    …ives (#480)
Commits on Apr 7, 2019
  1. Fix typechecking of Sorts in records (#453)

    f-f committed Apr 7, 2019
    Prior to this change the following did not typecheck, but they should have.
    They now correctly typecheck:
    - `{ a : Kind → Kind }`: type is `Sort`, as the type of `{ a : Type → Type }` is `Kind`
    - `{ a : { b : Kind } }`: type is `Sort`, as the type of `{ a : { b : Type } }` is `Kind`
    - `{ a : { b : Kind → Kind } }`: same as above, as the type of `{ a : { b : Type → Type } }` is `Kind`
    - `{ a = { b = Type } }`: type is `{ a : { b : Kind } }`, which is `Sort`-like
Commits on Mar 3, 2019
  1. Use binary encoding in parser tests (#393)

    f-f committed Mar 3, 2019
    For reasons specified in #384, this moves the "parser" tests from
    CBOR-JSON encoding to binary CBOR encoding.
    
    This also includes a script to help debugging binary-encoded tests
  2. Sort record and union fields before CBOR encoding them (#392)

    f-f committed Mar 3, 2019
Commits on Feb 24, 2019
  1. Fix 'correct' JSON encoding for doubles in parser test (#380)

    f-f committed Feb 24, 2019
    The file `tests/parser/success/doubleA.dhall` looks like this:
    
    ```
    [ 1.1, -1.1, 1e1, 1.1e1, -1.1 ]
    ```
    
    It is there to verify that doubles are properly parsed by an implementation.
    Evaluating it with the Haskell implementation gives:
    
    ```
    $ dhall <<< "./tests/parser/success/doubleA.dhall"
    [ 1.1, -1.1, 10.0, 11.0, -1.1 ]
    ```
    
    ..which is correct.
    
    Now, the `doubleB.json` file looks like this instead:
    
    ```json
    [
      4,
      null,
      1.1,
      -1.1,
      10,
      11,
      -1.1
    ]
    ```
    
    While this may seem "incorrect", js thinks this is the right thing to do:
    
    ```
    $ node
    > 1.1
    1.1
    > -1.1
    -1.1
    > 10.0
    10
    > 11.0
    11
    ```
    
    It looks like the `doubleB.json` file was generated by `dhall encode --json`,
    which converts in the same way (I suppose it is due to the JSON standard 
    and "every number is a float in js", but I didn't dig in)
    
    Now, while this is "correct" from the JSON point of view, it's not testing what
    we want to test (that is: verify that doubles are indeed treated as doubles), so
    this PR changes the test to represent these doubles as doubles instead of ints.
  2. Add tests to exercise parser tokens for special Double values (#381)

    f-f committed Feb 24, 2019
Commits on Feb 22, 2019
  1. CBOR-encode only some special values as half-floats (#376)

    f-f committed Feb 22, 2019
    The reason for this change is that the JVM doesn't really support 16-bit floats,
    so for binary compatibility across platforms it's a good idea to raise the 
    "smallest representation" to be 32-bit floats.
    
    This PR specifies that only 4 values should be encoded as half-floats when
    converting to CBOR representation:
    
        * 0.0 → 0x0000
        * NaN` → 0x7e00
        * Infinity` → 0x7c00
        * -Infinity` → 0xfc00
    
    The values used here for the conversion are specified in the CBOR RFC, page 42:
    https://tools.ietf.org/html/rfc7049
    
    This also adds some "binary" tests, so that we can verify that different implementations
    serialize to the same bytes.
Commits on Feb 20, 2019
  1. Allow whitespace after -Infinity (#377)

    f-f committed Feb 20, 2019
Commits on Dec 3, 2018
  1. Sync tests from dhall-haskell (#309)

    f-f committed Dec 3, 2018
Commits on Nov 27, 2018
  1. Update hashes in tests to v4.0.0 (#304)

    f-f committed Nov 27, 2018
Commits on Nov 20, 2018
  1. Require whitespace after the colon in type annotations (#290)

    f-f committed Nov 20, 2018
Commits on Nov 18, 2018
  1. Fix specification for running import tests (#286)

    f-f authored and Gabriel439 committed Nov 18, 2018
  2. Add failure test for duplicated record fields to typecheck suite (#278)

    f-f committed Nov 18, 2018
Commits on Nov 16, 2018
  1. Add parser tests (#276)

    f-f committed Nov 16, 2018
    Add a set of agnostic tests for the parser. Since the AST is not
    standard, the closest thing we have is the binary encoding specification
    (that is, the conversion to CBOR datastructures).
    
    In this way we can verify that the parser is working correctly by
    parsing expressions and then encoding them in their CBOR representation
    (in plaintext JSON - for readability), and then checking that the
    encoding is correct.
Commits on Nov 11, 2018
  1. Add normalization test for multiple let bindings (#270)

    f-f committed Nov 11, 2018
Commits on Nov 10, 2018
  1. Add requirement for adding tests when making changes (#269)

    f-f committed Nov 10, 2018
Commits on Nov 9, 2018
  1. Add acceptance tests (#265)

    f-f committed Nov 9, 2018
    * Port normalization, import and typecheck tests from the Haskell implementation
    * Add a small document to describe how to run the tests
Commits on Sep 26, 2018
  1. Clarify the binary encoding of text literals (#235)

    f-f committed Sep 26, 2018
Commits on Aug 11, 2018
  1. Fix typos and formatting in semantics document (#212)

    f-f committed Aug 11, 2018
Commits on Jul 28, 2018
  1. Fix Integer/Natural mismatch in β-normalization section (#204)

    f-f committed Jul 28, 2018
    Updates the examples in this section to the Natural/Integer syntax switch
Commits on Jul 27, 2018
  1. Require whitespace when parsing the + operator (#202)

    f-f committed Jul 27, 2018
    We require whitespace when parsing the `NaturalPlus` operator,
    so it's not ambiguous with the `+` symbol for `Integer`.
    
    This is a breaking change, and this code that was previously valid
    will now fail to parse: `λ(x : Natural) → 1+x`.
Commits on Jul 17, 2018
  1. Add docs about Versioning and Release process (#195)

    f-f committed Jul 17, 2018
    We add:
    - a `VERSIONING.md` file, that documents what we consider a release,
       how and when and what we release
    - a `CHANGELOG.md` file, that will keep and classify all the changes between versions
    - a `release_template.md`, to serve as a checklist when making new releases
Commits on Jul 13, 2018
  1. Add `$` as an allowed character in quoted labels (#184)

    f-f committed Jul 13, 2018
Commits on Jun 13, 2018
  1. Add support for alternative imports (#172)

    f-f committed Jun 13, 2018
    This adds support for specifying alternative for imports, as detailed in #163.
    We add:
    - a `?` operator for specifying alternatives
    - a `missing` keyword for impossible imports (identity for the above operator)
    
    Fix #163, fix #70
Commits on May 28, 2018
  1. Remove ambiguity from imports in grammar (#161)

    f-f committed May 28, 2018
    Before this change, the grammar made possible to parse an expression 
    like `./a.b` in 3 different ways. This change removes this ambiguity from
    the import parsing, as discussed in #159. (This fixes #159)
    
    The tradeoffs of this fix are:
    * Users now need to parenthesize imports if they want to access their fields
    * Expressions like `f(x)` are no longer allowed, as there needs to be whitespace
      between components of import and application expressions
Commits on May 19, 2018
  1. Update README examples to new Natural/Integer semantics (#152)

    f-f authored and Gabriel439 committed May 19, 2018
Commits on May 17, 2018
  1. Add section about Prelude in README (#151)

    f-f committed May 17, 2018
    Where we keep track of all the ways it's distributed
Commits on May 7, 2018
Commits on Mar 27, 2018
  1. ABNF: encode reserved labels correctly in grammar (#122)

    f-f authored and Gabriel439 committed Mar 27, 2018
    This allows parsers generated from the grammar to correctly handle
    reserved labels without any hand-modifications to the generated
    parsing code
You can’t perform that action at this time.