Commit d2959dfb authored by Simon Peyton Jones's avatar Simon Peyton Jones

Comments and equation ordering only

parent 8fa5f5b1
......@@ -920,8 +920,10 @@ of the scope of a `seq`, or dropped the `seq` altogether.
-}
cpe_ExprIsTrivial :: CoreExpr -> Bool
-- Version that doesn't consider an scc annotation to be trivial.
-- See also 'exprIsTrivial'
-- This function differs from CoreUtils.exprIsTrivial only in its
-- treatment of (Lit l). Otherwise it's identical.
-- No one knows why this difference is important: Trac #11158.
-- Someone should find out
cpe_ExprIsTrivial (Var _) = True
cpe_ExprIsTrivial (Type _) = True
cpe_ExprIsTrivial (Coercion _) = True
......
......@@ -803,10 +803,10 @@ exprIsTrivial (Type _) = True
exprIsTrivial (Coercion _) = True
exprIsTrivial (Lit lit) = litIsTrivial lit
exprIsTrivial (App e arg) = not (isRuntimeArg arg) && exprIsTrivial e
exprIsTrivial (Lam b e) = not (isRuntimeVar b) && exprIsTrivial e
exprIsTrivial (Tick t e) = not (tickishIsCode t) && exprIsTrivial e
-- See Note [Tick trivial]
exprIsTrivial (Cast e _) = exprIsTrivial e
exprIsTrivial (Lam b body) = not (isRuntimeVar b) && exprIsTrivial body
exprIsTrivial (Case e _ _ []) = exprIsTrivial e -- See Note [Empty case is trivial]
exprIsTrivial _ = False
......
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