[project @ 1999-04-27 15:23:29 by simonm]
authorsimonm <unknown>
Tue, 27 Apr 1999 15:23:29 +0000 (15:23 +0000)
committersimonm <unknown>
Tue, 27 Apr 1999 15:23:29 +0000 (15:23 +0000)
Mark PrimOp arguments as lazy.  This stops the simplifier throwing
away cases, and is consistent with the way applications work.  We
could probably do better by using the information from
primOpStrictness.

ghc/compiler/simplCore/OccurAnal.lhs

index 5b021f0..0025172 100644 (file)
@@ -606,6 +606,7 @@ occAnal env (Con con args)
        -- arguments are just variables, or trivial expressions.
        final_arg_uds    = case con of
                                DataCon _ -> mapVarEnv markMany arg_uds
+                               PrimOp _  -> mapVarEnv markLazy arg_uds
                                other     -> arg_uds
     in
     (final_arg_uds, Con con args')