Skip to content

Commit 008a9c3

Browse files
Gabriella439mergify[bot]
authored andcommitted
Fix parser for expressions with nested annotations (#1527)
Fixes #1467 We now no longer replace an annotation if one was already present
1 parent a0c3be9 commit 008a9c3

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

dhall/src/Dhall/Parser/Expression.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,11 @@ parsers embedded = Parsers {..}
273273
nonemptyWhitespace
274274
b <- expression
275275
case shallowDenote a of
276-
ListLit _ [] ->
276+
ListLit Nothing [] ->
277277
return (ListLit (Just b) [])
278-
Merge c d _ ->
278+
Merge c d Nothing ->
279279
return (Merge c d (Just b))
280-
ToMap c _ ->
280+
ToMap c Nothing ->
281281
return (ToMap c (Just b))
282282
_ -> return (Annot a b)
283283

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
([] : a) : b
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
([] : a) : b

0 commit comments

Comments
 (0)