#3803: addCoverageTicksTobind should not panic when file location is Nothing
---------------------------------+------------------------------------------
Reporter: clemens | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.12.1 | Keywords: hpc
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
compiler/deSugar/Coverage.lhs:
{{{
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"
}}}
Is there any reason for this function to panic? It is the only function
(at least in my use-case) of the GHC API that panics on ms_hs_file =
Nothing. I suggest to handle this more graceful and return emptyHpcInfo
and emptyModBreaks just as in the case of file ending in .boot
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3803>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs