X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FdeSugar%2FCoverage.lhs;h=7b58a95e083c86bdd149867229a8f943de90114a;hb=334a6323edaec65fc22c5d872a7050a5266ec470;hp=0156651864c28b4fd93b8737eccaa4589f078c27;hpb=ad94d40948668032189ad22a0ad741ac1f645f50;p=ghc-hetmet.git diff --git a/compiler/deSugar/Coverage.lhs b/compiler/deSugar/Coverage.lhs index 0156651..7b58a95 100644 --- a/compiler/deSugar/Coverage.lhs +++ b/compiler/deSugar/Coverage.lhs @@ -9,7 +9,7 @@ -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and fix -- any warnings in the module. See --- http://hackage.haskell.org/trac/ghc/wiki/CodingStyle#Warnings +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings -- for details module Coverage (addCoverageTicksToBinds) where @@ -195,12 +195,8 @@ addTickLHsBind (L pos (pat@(PatBind { pat_rhs = rhs }))) = do -} return $ L pos $ pat { pat_rhs = rhs' } -{- only internal stuff, not from source, uses VarBind, so we ignore it. -addTickLHsBind (VarBind var_id var_rhs) = do - var_rhs' <- addTickLHsExpr var_rhs - return $ VarBind var_id var_rhs' --} -addTickLHsBind other = return other +-- Only internal stuff, not from source, uses VarBind, so we ignore it. +addTickLHsBind var_bind@(L _ (VarBind {})) = return var_bind -- Add a tick to the expression no matter what it is. There is one exception: -- for the debugger, if the expression is a 'let', then we don't want to add @@ -637,7 +633,7 @@ bindLocals :: [Id] -> TM a -> TM a bindLocals new_ids (TM m) = TM $ \ env st -> case m env{ inScope = inScope env `extendVarSetList` new_ids } st of - (r, fv, st') -> (r, fv `delListFromUFM` occs, st') + (r, fv, st') -> (r, fv `delListFromOccEnv` occs, st') where occs = [ nameOccName (idName id) | id <- new_ids ] isBlackListed :: SrcSpan -> TM Bool