Commit e08cad76 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Wibbles to 'simplify the SimplCont data type'

parent 4bbd6bae
......@@ -162,7 +162,7 @@ addArgTo ai arg = ai { ai_args = arg : ai_args ai
, ai_type = applyTypeToArg (ai_type ai) arg }
instance Outputable SimplCont where
ppr (Stop _ interesting) = ptext (sLit "Stop") <> brackets (ppr interesting)
ppr (Stop ty interesting) = ptext (sLit "Stop") <> brackets (ppr interesting) <+> ppr ty
ppr (ApplyTo dup arg _ cont) = ((ptext (sLit "ApplyTo") <+> ppr dup <+> pprParendExpr arg)
{- $$ nest 2 (pprSimplEnv se) -}) $$ ppr cont
ppr (StrictBind b _ _ _ cont) = (ptext (sLit "StrictBind") <+> ppr b) $$ ppr cont
......
......@@ -339,13 +339,13 @@ simplLazyBind env top_lvl is_rec bndr bndr1 rhs rhs_se
-- f = /\a. \x. g a x
-- should eta-reduce
body_out_ty :: OutType
body_out_ty = substTy env (exprType body)
; (body_env, tvs') <- simplBinders rhs_env tvs
-- See Note [Floating and type abstraction] in SimplUtils
-- Simplify the RHS
; let body_out_ty :: OutType
body_out_ty = substTy body_env (exprType body)
; (body_env1, body1) <- simplExprF body_env body (mkRhsStop body_out_ty)
-- ANF-ise a constructor or PAP rhs
; (body_env2, body2) <- prepareRhs top_lvl body_env1 bndr1 body1
......
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