@@ -82,11 +82,13 @@ readBinary path =
8282 return (Just a)
8383
8484 Left (offset, message) ->
85− do IO.hPutStrLn IO.stderr $ unlines $
85+ do Dir.copyFile path "bad.dat"
86+ IO.hPutStrLn IO.stderr $ unlines $
8687 [ "+-------------------------------------------------------------------------------"
87− , "| Corrupt File: " ++ path
88− , "| Byte Offset: " ++ show offset
89− , "| Message: " ++ message
88+ , "| Corrupt File: " ++ path
89+ , "| Byte Offset: " ++ show offset
90+ , "| Message: " ++ message
91+ , "|"
9092 , "| Please report this to https://github.com/elm/compiler/issues"
9193 , "| Trying to continue anyway."
9294 , "+-------------------------------------------------------------------------------"