Skip to content

Allow Some in with expression#2354

Merged
Gabriella439 merged 3 commits intodhall-lang:masterfrom
darichey:master
Dec 31, 2021
Merged

Allow Some in with expression#2354
Gabriella439 merged 3 commits intodhall-lang:masterfrom
darichey:master

Conversation

@darichey
Copy link
Contributor

Fix for small discrepancy between dhall-haskell and the reference implementation/standard.

Before:

⊢ { Some = 0 } with Some = 1

Error: Invalid input

(input):1:23:
  |
1 | { Some = 0 } with Some = 1
  |                       ^
expecting any label or whitespace

After:

⊢ { Some = 0 } with Some = 1

{ Some = 1 }

Copy link
Collaborator

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Ideally we'd also have a test for this in tests/parser/success/unit. Would you like to give this a try?

To generate the corresponding .dhallb CBOR output, you can run the dhall:tasty tests in this repo with the --accept flag, e.g.

cabal test dhall:tasty --test-options=--accept

Also see https://github.com/dhall-lang/dhall-lang/tree/master/tests#running-parser-tests.

@darichey
Copy link
Contributor Author

Gave it a try!

@Gabriella439 Gabriella439 merged commit ba61a24 into dhall-lang:master Dec 31, 2021
@Gabriella439
Copy link
Collaborator

Thank you for fixing that! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants