Commit 9f990650 authored by Simon Marlow's avatar Simon Marlow
Browse files

follow changes in Core: Note -> Tick

parent fd896fd7
......@@ -25,10 +25,10 @@ replaceInExpr (Lit l) = Lit l
replaceInExpr (Lam b e) = Lam b (replaceInExpr e)
replaceInExpr (App e1 e2) = App (replaceInExpr e1) (replaceInExpr e2)
replaceInExpr (Let bi e) = Let (replaceInBind bi) (replaceInExpr e)
replaceInExpr (Note no e) = Note no (replaceInExpr e)
replaceInExpr (Tick t e) = Tick t (replaceInExpr e)
replaceInExpr (Cast e co) = Cast (replaceInExpr e) co
replaceInExpr (Case e b ty alts) = Case (replaceInExpr e) b ty (map replaceInAlt alts)
replaceInExpr (Type ty) = Type ty
replaceInAlt :: CoreAlt -> CoreAlt
replaceInAlt (ac, bs, e) = (ac, bs, replaceInExpr e)
\ No newline at end of file
replaceInAlt (ac, bs, e) = (ac, bs, replaceInExpr e)
......@@ -75,7 +75,7 @@ changeExpr anns mb_replacement e = let go = changeExpr anns mb_replacement in ca
Let bind e -> liftM2 Let (changeBind anns mb_replacement bind) (go e)
Case e b ty alts -> liftM4 Case (go e) (return b) (return ty) (mapM (changeAlt anns mb_replacement) alts)
Cast e coerce -> liftM2 Cast (go e) (return coerce)
Note note e -> liftM (Note note) (go e)
Tick t e -> liftM (Tick t) (go e)
_ -> return e
changeAlt :: UniqFM [ReplaceWith] -> Maybe String -> CoreAlt -> CoreM CoreAlt
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment