Skip to content

require whitespace after let-binding#1252

Merged
Gabriella439 merged 1 commit intodhall-lang:masterfrom
hagl:whitespace_after_let_binding
Dec 23, 2021
Merged

require whitespace after let-binding#1252
Gabriella439 merged 1 commit intodhall-lang:masterfrom
hagl:whitespace_after_let_binding

Conversation

@hagl
Copy link
Copy Markdown
Contributor

@hagl hagl commented Dec 16, 2021

The whitespace after a let-binding is currently optional, this allows expressions like the following:

let x = 3let y = x in y
let x = NaNin x

The reference implementation accepts these expressions while the dhall-haskell rejects them.
Surprisingly

let x = Truein x

is also rejected by the reference implementation.
To avoid such inconsistencies and confusing expressions, I'd suggest changing the dhall grammar to require whitespace after the let-binding.

@Nadrieril
Copy link
Copy Markdown
Member

Good catch!
Could you add a test for a less obvious case like let x = 3 in{ x }?

@Gabriella439 Gabriella439 merged commit c9ed56f into dhall-lang:master Dec 23, 2021
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