Commit eb8117f9 authored by Simon Marlow's avatar Simon Marlow
Browse files

addCoverageTicksToBinds: tolerate a non-existent .hs file (#3803)

parent 2f986c6f
......@@ -52,12 +52,10 @@ addCoverageTicksToBinds
-> LHsBinds Id
-> IO (LHsBinds Id, HpcInfo, ModBreaks)
addCoverageTicksToBinds dflags mod mod_loc tyCons binds = do
let orig_file =
case ml_hs_file mod_loc of
Just file -> file
Nothing -> panic "can not find the original file during hpc trans"
addCoverageTicksToBinds dflags mod mod_loc tyCons binds =
case ml_hs_file mod_loc of
Nothing -> return (binds, emptyHpcInfo False, emptyModBreaks)
Just orig_file -> do
if "boot" `isSuffixOf` orig_file then return (binds, emptyHpcInfo False, emptyModBreaks) else do
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment