Mention name of file even when rendered version fails to parse
Without this info it's hard to know which file from a bulk is problematic.
commitd63eeea3df7dc3f4e47c50fca4bd8356cdc20546
authormrkkrp <mark.karpov@tweag.io>
dateSun 7 Jul 2019, 13:43 (7 years ago)
parentd82d607
src/Ormolu.hs+5−1
@@ -60,7 +60,11 @@ ormolu cfg path str = do
6060 -- same as AST of original snippet module span positions.
6161 unless (cfgUnsafe cfg) $ do
6262 (_, result1) <-
63− parseModule' cfg OrmoluOutputParsingFailed "<rendered>" (T.unpack txt)
63+ parseModule'
64+ cfg
65+ OrmoluOutputParsingFailed
66+ (path ++ "<rendered>")
67+ (T.unpack txt)
6468 when (diff result0 result1) $
6569 liftIO $ throwIO (OrmoluASTDiffers str txt)
6670 return txt