X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FdeSugar%2FCoverage.lhs;h=7b58a95e083c86bdd149867229a8f943de90114a;hb=334a6323edaec65fc22c5d872a7050a5266ec470;hp=f2ad77c86aca159236964817118d8694f614fe71;hpb=e4069ec804ff2a5208b29cfded019da66a8dd7e3;p=ghc-hetmet.git diff --git a/compiler/deSugar/Coverage.lhs b/compiler/deSugar/Coverage.lhs index f2ad77c..7b58a95 100644 --- a/compiler/deSugar/Coverage.lhs +++ b/compiler/deSugar/Coverage.lhs @@ -5,6 +5,13 @@ \section[Coverage]{@coverage@: the main function} \begin{code} +{-# OPTIONS -w #-} +-- 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/Commentary/CodingStyle#Warnings +-- for details + module Coverage (addCoverageTicksToBinds) where #include "HsVersions.h" @@ -188,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 @@ -630,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