= let
expr_val = absEval anal expr env
abs_alts = [ absEval anal rhs env | (_, rhs) <- alts ]
- -- Don't bother to extend envt, because unbound vars
- -- default to the conservative AbsTop
+ -- PrimAlts don't bind anything, so no need
+ -- to extend the environment
abs_deflt = absEvalDefault anal expr_val deflt env
in
-- (If the scrutinee is Top we'll never evaluated this function
-- call anyway!)
ASSERT(ok_scrutinee)
- absEval anal rhs env
+ absEval anal rhs rhs_env
where
+ rhs_env = growAbsValEnvList env (args `zip` repeat AbsTop)
+ -- We must extend the environment, because
+ -- there might be shadowing
+
ok_scrutinee
= case other_scrutinee of {
AbsTop -> True; -- i.e., OK