import System.Directory ( createDirectoryIfMissing )
#endif
-#if GHCI
import Trace.Hpc.Mix
import Trace.Hpc.Util
-#endif
import BreakArray
import Data.HashTable ( hashString )
-> LHsBinds Id
-> IO (LHsBinds Id, HpcInfo, ModBreaks)
-#if GHCI
addCoverageTicksToBinds dflags mod mod_loc tyCons binds = do
let orig_file =
when (length entries' /= tickBoxCount st) $ do
panic "the number of .mix entries are inconsistent"
let hashNo = mixHash orig_file modTime tabStop entries'
- mixCreate hpc_dir mod_name (Mix orig_file modTime (toHash hashNo) tabStop entries')
+ mixCreate hpc_dir mod_name
+ $ Mix orig_file modTime (toHash hashNo) tabStop entries'
return $ hashNo
else do
return $ 0
mixHash file tm tabstop entries = fromIntegral $ hashString
(show $ Mix file tm 0 tabstop entries)
\end{code}
-
-
-\begin{code}
-#else
-addCoverageTicksToBinds dflags mod mod_loc tyCons binds =
- return (binds, noHpcInfo, emptyModBreaks)
-#endif
-\end{code}
\ No newline at end of file
--------- Haskell Program Coverage -----------------------------------
, ( "fhpc" , PassFlag addOpt )
- , ( "fhpc-tracer" , PassFlag addOpt )
--------- Profiling --------------------------------------------------
, ( "auto-all" , NoArg (addOpt "-fauto-sccs-on-all-toplevs") )
opt_SccProfilingOn = lookUp FSLIT("-fscc-profiling")
opt_DoTickyProfiling = WayTicky `elem` (unsafePerformIO $ readIORef v_Ways)
--- Hpc opts, only work in a stage2 build
-#if GHCI
+-- Hpc opts
opt_Hpc = lookUp FSLIT("-fhpc")
-#else
-opt_Hpc = False
-#endif
-- language opts
opt_DictsStrict = lookUp FSLIT("-fdicts-strict")