Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dhall/src/Dhall/Parser/Expression.hs
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,11 @@ parsers embedded = Parsers{..}
nonemptyWhitespace
case (shallowDenote a, a0Info) of
(ListLit Nothing [], _) -> do
b <- applicationExpression
b <- expression

return (ListLit (Just b) [])
(Merge c d Nothing, NakedMergeOrSomeOrToMap) -> do
b <- applicationExpression
b <- expression

return (Merge c d (Just b))
(ToMap c Nothing, NakedMergeOrSomeOrToMap) -> do
Expand Down
8 changes: 4 additions & 4 deletions dhall/src/Dhall/Pretty/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -861,15 +861,15 @@ prettyPrinters characterSet =
<> Pretty.indent 2 (prettyImportExpression_ b)
<> Pretty.hardline
<> colon <> space
<> prettyApplicationExpression c
<> prettyExpression c
)

short = keyword "merge" <> space
<> prettyImportExpression_ a
<> " "
<> prettyImportExpression_ b
<> space <> colon <> space
<> prettyApplicationExpression c
<> prettyExpression c
prettyAnnotatedExpression (ToMap a (Just b)) =
Pretty.group (Pretty.flatAlt long short)
where
Expand All @@ -880,13 +880,13 @@ prettyPrinters characterSet =
<> Pretty.indent 2 (prettyImportExpression_ a)
<> Pretty.hardline
<> colon <> space
<> prettyApplicationExpression b
<> prettyExpression b
)

short = keyword "toMap" <> space
<> prettyImportExpression_ a
<> space <> colon <> space
<> prettyApplicationExpression b
<> prettyExpression b
prettyAnnotatedExpression a0@(Annot _ _) =
enclose'
""
Expand Down