From bc58b3452f4f871a152b691327c05b1d8f1121c2 Mon Sep 17 00:00:00 2001 From: emmabastas Date: Fri, 9 Jul 2021 16:29:32 +0200 Subject: [PATCH] Report source name in error instead of "TODO" --- elm-format-lib/src/Parse/ParsecAdapter.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elm-format-lib/src/Parse/ParsecAdapter.hs b/elm-format-lib/src/Parse/ParsecAdapter.hs index 12076906d..36426675b 100644 --- a/elm-format-lib/src/Parse/ParsecAdapter.hs +++ b/elm-format-lib/src/Parse/ParsecAdapter.hs @@ -111,8 +111,8 @@ unknownError row col = unexpected :: String -> Parser a unexpected msg = - EP.Parser $ \(EP.State _ _ _ _ row col _ _) _ _ _ eerr -> - eerr row col (newErrorMessage (UnExpect msg) "TODO") + EP.Parser $ \(EP.State _ _ _ _ row col sourceName _) _ _ _ eerr -> + eerr row col (newErrorMessage (UnExpect msg) sourceName) type Parser a = EP.Parser ParseError a