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

Improve robustness of :let command #2297

Merged
merged 4 commits into from
Sep 2, 2021
Merged

Improve robustness of :let command #2297

merged 4 commits into from
Sep 2, 2021

Conversation

Gabriella439
Copy link
Collaborator

Fixes #2296

The root cause of the above bug was that the old parser for :let
commands was too lenient. In particular, given a command like:

:let x : T = e

… the old parser would silently ignore the : T part of the command.

This change fixes that by adding support for type annotations and
fixing the :let command to exactly match the standard parser in
terms of what expressions it permits.

Fixes #2296

The root cause of the above bug was that the old parser for `:let`
commands was too lenient.  In particular, given a command like:

```
:let x : T = e
```

… the old parser would silently ignore the `: T` part of the command.

This change fixes that by adding support for type annotations and
fixing the `:let` command to exactly match the standard parser in
terms of what expressions it permits.
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.

LGTM modulo a small readability issue.

dhall/src/Dhall/Repl.hs Outdated Show resolved Hide resolved
… as suggested by @sjakobi
@mergify mergify bot merged commit fa11f0c into master Sep 2, 2021
@mergify mergify bot deleted the gabriel/fix_repl_let branch September 2, 2021 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is this a bug in the type checker with dependent types? ∀(x: Type) → x
2 participants