Skip to content

Commit

Permalink
Fix grammar for empty list literals (#645)
Browse files Browse the repository at this point in the history
The current grammar forbids: `[] : List a` because it uses `import-expression`
for the type annotation, which in turn forbids an unparenthesized
application of the `List` type constructor to `a`.  Changing it to
`application-expression` fixes that (which makes sense, since `List a`
is an application expression).
  • Loading branch information
Gabriella439 committed Jul 19, 2019
1 parent 91bbae6 commit 5ca75a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion standard/dhall.abnf
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ expression =
; NOTE: Backtrack if parsing this alternative fails since we can't tell
; from the opening bracket whether or not this will be an empty list or
; a non-empty list
/ "[" whsp "]" whsp ":" whsp1 import-expression
/ "[" whsp "]" whsp ":" whsp1 application-expression

; "toMap e : t"
;
Expand Down

0 comments on commit 5ca75a9

Please sign in to comment.