File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -772,8 +772,6 @@ parsers embedded = Parsers {..}
772772
773773 value <- expression
774774
775- whitespace
776-
777775 let cons key (key', values) =
778776 (key, RecordLit [ (key', values) ])
779777
@@ -786,7 +784,7 @@ parsers embedded = Parsers {..}
786784 x :| [] -> return (x, Var (V x 0 ))
787785 _ -> empty
788786
789- normalRecordEntry <|> punnedEntry
787+ ( normalRecordEntry <|> punnedEntry) <* whitespace
790788
791789 let nonEmptyRecordLiteral = do
792790 as <- Text.Megaparsec. sepBy1 keysValue (_comma *> whitespace)
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ tests =
4444 , issue1341
4545 , issue1584
4646 , issue1646
47+ , issue1732
4748 , parsing0
4849 , typeChecking0
4950 , typeChecking1
@@ -196,6 +197,13 @@ issue1646 = Test.Tasty.HUnit.testCase "Issue #1646" (do
196197 _ <- Util. code " ./tests/regression/issue1646.dhall"
197198 return () )
198199
200+ issue1732 :: TestTree
201+ issue1732 = Test.Tasty.HUnit. testCase " Issue #1732" (do
202+ -- This test ensures that the parser allows whitespace after a record pun
203+ -- entry
204+ _ <- Util. code " ./tests/regression/issue1732.dhall"
205+ return () )
206+
199207parsing0 :: TestTree
200208parsing0 = Test.Tasty.HUnit. testCase " Parsing regression #0" (do
201209 -- Verify that parsing should not fail
Original file line number Diff line number Diff line change 1+ let x = 0 in { x , a = 0 }
You can’t perform that action at this time.
0 commit comments