- ; let noDbgSites = []
- ; mb_res <- case ghcMode dflags of
- JustTypecheck -> return (Just ([], [], NoStubs, noHpcInfo, noDbgSites))
- _ -> do (binds_cvr,ds_hpc_info)
- <- if opt_Hpc
- then addCoverageTicksToBinds dflags mod mod_loc binds
- else return (binds, noHpcInfo)
+ ; let target = hscTarget dflags
+ ; mb_res <- case target of
+ HscNothing -> return (Just ([], [], NoStubs, noHpcInfo, emptyModBreaks))
+ _ -> do (binds_cvr,ds_hpc_info, modBreaks)
+ <- if opt_Hpc || target == HscInterpreted
+ then addCoverageTicksToBinds dflags mod mod_loc (typeEnvTyCons type_env) binds
+ else return (binds, noHpcInfo, emptyModBreaks)