X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FdeSugar%2FCoverage.lhs;h=2136d016750a708321c146409ae3fbe76d3f62b1;hb=0eeb7f045b160c17056be59078f61525f47bce3d;hp=dce7962fcf99295aedf5f68144823d2054b64cc3;hpb=1e50fd4185479a62e02d987bdfcb1c62712859ca;p=ghc-hetmet.git diff --git a/compiler/deSugar/Coverage.lhs b/compiler/deSugar/Coverage.lhs index dce7962..2136d01 100644 --- a/compiler/deSugar/Coverage.lhs +++ b/compiler/deSugar/Coverage.lhs @@ -461,13 +461,15 @@ addTickStmt isGuard (GroupStmt (stmts, binderMap) groupByClause) = do case x of Left a -> f a >>= (return . Left) Right b -> g b >>= (return . Right) -addTickStmt isGuard (RecStmt stmts ids1 ids2 tys dictbinds) = do - liftM5 RecStmt - (addTickLStmts isGuard stmts) - (return ids1) - (return ids2) - (return tys) - (addTickDictBinds dictbinds) +addTickStmt isGuard stmt@(RecStmt {}) + = do { stmts' <- addTickLStmts isGuard (recS_stmts stmt) + ; ret' <- addTickSyntaxExpr hpcSrcSpan (recS_ret_fn stmt) + ; mfix' <- addTickSyntaxExpr hpcSrcSpan (recS_mfix_fn stmt) + ; bind' <- addTickSyntaxExpr hpcSrcSpan (recS_bind_fn stmt) + ; dicts' <- addTickDictBinds (recS_dicts stmt) + ; return (stmt { recS_stmts = stmts', recS_ret_fn = ret' + , recS_mfix_fn = mfix', recS_bind_fn = bind' + , recS_dicts = dicts' }) } addTick :: Maybe (Bool -> BoxLabel) -> LHsExpr Id -> TM (LHsExpr Id) addTick isGuard e | Just fn <- isGuard = addBinTickLHsExpr fn e