remove empty expected messages

This commit is contained in:
Mesabloo 2022-04-23 05:11:10 +02:00
parent 488c3a6a4d
commit baf3c56ff8

View File

@ -70,7 +70,7 @@ diagnosticFromParseError isError code msg (fromMaybe [] -> defaultHints) error =
]
<> [ (source, marker) | msg <- messages, let marker = This $ fromString msg
]
<> [(source, Where $ fromString $ "expecting any of " <> intercalate ", " expectedList)]
<> [(source, Where $ fromString $ "expecting any of " <> intercalate ", " (filter (not . null) expectedList))]
-- | Generates an error diagnostic from a 'PE.ParseError'.
errorDiagnosticFromParseError ::