diff options
author | Max Bolingbroke <batterseapower@hotmail.com> | 2012-03-17 11:14:53 +0000 |
---|---|---|
committer | Max Bolingbroke <batterseapower@hotmail.com> | 2012-05-15 15:14:03 +0100 |
commit | c08df442b0391f3a0d26e17ce05f635dedb1467b (patch) | |
tree | 05f0a68c8ae09414ac1138d9559df5ac7133984d /compiler/stgSyn | |
parent | 921530b477867edb5158e4ad5bbbdb5c7c531c97 (diff) | |
download | haskell-c08df442b0391f3a0d26e17ce05f635dedb1467b.tar.gz |
Remove the unused Type field from StgLam
Diffstat (limited to 'compiler/stgSyn')
-rw-r--r-- | compiler/stgSyn/CoreToStg.lhs | 6 | ||||
-rw-r--r-- | compiler/stgSyn/StgLint.lhs | 2 | ||||
-rw-r--r-- | compiler/stgSyn/StgSyn.lhs | 4 |
3 files changed, 5 insertions, 7 deletions
diff --git a/compiler/stgSyn/CoreToStg.lhs b/compiler/stgSyn/CoreToStg.lhs index c4f289c68e..d923f68887 100644 --- a/compiler/stgSyn/CoreToStg.lhs +++ b/compiler/stgSyn/CoreToStg.lhs @@ -277,7 +277,7 @@ mkTopStgRhs :: DynFlags -> FreeVarsInfo -> SRT -> StgBinderInfo -> StgExpr -> StgRhs -mkTopStgRhs _ rhs_fvs srt binder_info (StgLam _ bndrs body) +mkTopStgRhs _ rhs_fvs srt binder_info (StgLam bndrs body) = StgRhsClosure noCCS binder_info (getFVs rhs_fvs) ReEntrant @@ -343,7 +343,7 @@ coreToStgExpr expr@(Lam _ _) fvs = args' `minusFVBinders` body_fvs escs = body_escs `delVarSetList` args' result_expr | null args' = body - | otherwise = StgLam (exprType expr) args' body + | otherwise = StgLam args' body return (result_expr, fvs, escs) @@ -783,7 +783,7 @@ mkStgRhs :: FreeVarsInfo -> SRT -> StgBinderInfo -> StgExpr -> StgRhs mkStgRhs _ _ _ (StgConApp con args) = StgRhsCon noCCS con args -mkStgRhs rhs_fvs srt binder_info (StgLam _ bndrs body) +mkStgRhs rhs_fvs srt binder_info (StgLam bndrs body) = StgRhsClosure noCCS binder_info (getFVs rhs_fvs) ReEntrant diff --git a/compiler/stgSyn/StgLint.lhs b/compiler/stgSyn/StgLint.lhs index ec09c4d9a7..58f9f3b69e 100644 --- a/compiler/stgSyn/StgLint.lhs +++ b/compiler/stgSyn/StgLint.lhs @@ -175,7 +175,7 @@ lintStgExpr (StgOpApp _ args res_ty) = runMaybeT $ do _maybe_arg_tys <- mapM (MaybeT . lintStgArg) args return res_ty -lintStgExpr (StgLam _ bndrs _) = do +lintStgExpr (StgLam bndrs _) = do addErrL (ptext (sLit "Unexpected StgLam") <+> ppr bndrs) return Nothing diff --git a/compiler/stgSyn/StgSyn.lhs b/compiler/stgSyn/StgSyn.lhs index defec7516b..5270aa9a47 100644 --- a/compiler/stgSyn/StgSyn.lhs +++ b/compiler/stgSyn/StgSyn.lhs @@ -212,8 +212,6 @@ finished it encodes (\x -> e) as (let f = \x -> e in f) \begin{code} | StgLam - Type -- Type of whole lambda (useful when - -- making a binder for it) [bndr] StgExpr -- Body of lambda \end{code} @@ -702,7 +700,7 @@ pprStgExpr (StgConApp con args) pprStgExpr (StgOpApp op args _) = hsep [ pprStgOp op, brackets (interppSP args)] -pprStgExpr (StgLam _ bndrs body) +pprStgExpr (StgLam bndrs body) =sep [ char '\\' <+> ppr bndrs <+> ptext (sLit "->"), pprStgExpr body ] |