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