Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Some in with expression #2354

Merged
merged 3 commits into from
Dec 31, 2021
Merged

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