X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FdeSugar%2FCoverage.lhs;h=52c0f04b53a032043b0a43885fd1df049ea8e232;hb=a251cba370c9bfb291159c4deea20226a87eeac3;hp=2136d016750a708321c146409ae3fbe76d3f62b1;hpb=f04dead93a15af1cb818172f207b8a81d2c81298;p=ghc-hetmet.git diff --git a/compiler/deSugar/Coverage.lhs b/compiler/deSugar/Coverage.lhs index 2136d01..52c0f04 100644 --- a/compiler/deSugar/Coverage.lhs +++ b/compiler/deSugar/Coverage.lhs @@ -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 @@ -742,9 +740,9 @@ mkHpcPos pos start = srcSpanStart pos end = srcSpanEnd pos hpcPos = toHpcPos ( srcLocLine start - , srcLocCol start + 1 + , srcLocCol start , srcLocLine end - , srcLocCol end + , srcLocCol end - 1 ) hpcSrcSpan :: SrcSpan