summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-05-20 14:47:23 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-05-25 09:48:53 -0400
commit4c4312edd988b8aeeb65e095056743c30678df15 (patch)
tree3e3ca76db3907e2c60f418a03f9a442d515fca1f
parent013d71204be44d660f01f8eb255db2d48b832421 (diff)
downloadhaskell-4c4312edd988b8aeeb65e095056743c30678df15.tar.gz
Coverage: Drop redundant ad-hoc boot module check
To determine whether the module is a boot module Coverage.addTicksToBinds was checking for a `boot` suffix in the module source filename. This is quite ad-hoc and shouldn't be necessary; the callsite in `deSugar` already checks that the module isn't a boot module.
-rw-r--r--compiler/GHC/HsToCore/Coverage.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/GHC/HsToCore/Coverage.hs b/compiler/GHC/HsToCore/Coverage.hs
index d8b83bb25e..f5c667c687 100644
--- a/compiler/GHC/HsToCore/Coverage.hs
+++ b/compiler/GHC/HsToCore/Coverage.hs
@@ -78,8 +78,7 @@ addTicksToBinds
addTicksToBinds hsc_env mod mod_loc exports tyCons binds
| let dflags = hsc_dflags hsc_env
passes = coveragePasses dflags, not (null passes),
- Just orig_file <- ml_hs_file mod_loc,
- not ("boot" `isSuffixOf` orig_file) = do
+ Just orig_file <- ml_hs_file mod_loc = do
let orig_file2 = guessSourceFile binds orig_file