Skip to content
This repository was archived by the owner on Nov 24, 2018. It is now read-only.
This repository was archived by the owner on Nov 24, 2018. It is now read-only.

Valid Dhall not parsed by dhall-to-{json,yaml} #4

@chepner

Description

@chepner

Apologies if this has already been fixed, I'm having some issues getting the most recent versions compiled (tool chain issues on my end).

% dhall <<< '{foo="bar",}'
{ foo : Text }

{ foo = "bar" }
% src/Haskell-Dhall-JSON-Library/result/bin/dhall-to-yaml <<< '{foo="bar",}'

(stdin):1:1: error: expected: "[",
    "\8704", "\955", "\\", "forall",
    "if", "let", "merge"
{foo="bar",}
^
 % src/Haskell-Dhall-JSON-Library/result/bin/dhall-to-yaml <<< '{foo="bar"}'
foo: bar

Notice the trailing ,. While {"foo": "bar",} is not valid JSON, {foo = "bar",} is valid dhall and equivalent to {foo="bar"}, so I wouldn't expect the two to produce different JSON/Yaml, let alone have one be considered an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions