Fix parser for expressions with nested annotations (#1527)
Fixes https://github.com/dhall-lang/dhall-haskell/issues/1467 We now no longer replace an annotation if one was already present
This commit is contained in:
parent
a0c3be9ca1
commit
008a9c3e37
|
@ -273,11 +273,11 @@ parsers embedded = Parsers {..}
|
|||
nonemptyWhitespace
|
||||
b <- expression
|
||||
case shallowDenote a of
|
||||
ListLit _ [] ->
|
||||
ListLit Nothing [] ->
|
||||
return (ListLit (Just b) [])
|
||||
Merge c d _ ->
|
||||
Merge c d Nothing ->
|
||||
return (Merge c d (Just b))
|
||||
ToMap c _ ->
|
||||
ToMap c Nothing ->
|
||||
return (ToMap c (Just b))
|
||||
_ -> return (Annot a b)
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
([] : a) : b
|
|
@ -0,0 +1 @@
|
|||
([] : a) : b
|
Loading…
Reference in New Issue