summaryrefslogtreecommitdiff
path: root/compiler/deSugar/Coverage.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/deSugar/Coverage.hs')
-rw-r--r--compiler/deSugar/Coverage.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/deSugar/Coverage.hs b/compiler/deSugar/Coverage.hs
index b5c18e5d66..99ba96755f 100644
--- a/compiler/deSugar/Coverage.hs
+++ b/compiler/deSugar/Coverage.hs
@@ -292,11 +292,15 @@ addTickLHsBind (L pos (funBind@(FunBind { fun_id = (L _ id) }))) = do
tickish <- tickishType `liftM` getEnv
if inline && tickish == ProfNotes then return (L pos funBind) else do
- (fvs, mg@(MG { mg_alts = matches' })) <-
+ (fvs, mg) <-
getFreeVars $
addPathEntry name $
addTickMatchGroup False (fun_matches funBind)
+ case mg of
+ MG {} -> return ()
+ _ -> panic "addTickLHsBind"
+
blackListed <- isBlackListed pos
exported_names <- liftM exports getEnv
@@ -315,7 +319,7 @@ addTickLHsBind (L pos (funBind@(FunBind { fun_id = (L _ id) }))) = do
return Nothing
let mbCons = maybe Prelude.id (:)
- return $ L pos $ funBind { fun_matches = mg { mg_alts = matches' }
+ return $ L pos $ funBind { fun_matches = mg
, fun_tick = tick `mbCons` fun_tick funBind }
where