diff options
author | Leif Metcalf <me@leif.nz> | 2021-01-20 15:33:47 +1300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-01-29 04:02:41 -0500 |
commit | 37378a0b20d068f5704486dbd03b3f4099442965 (patch) | |
tree | ac26eed3c2be791addf615e06e3c84546ab3abc3 /compiler/GHC/Stg/Lint.hs | |
parent | 7105cda81c525afc62df5e798813350729b1db9b (diff) | |
download | haskell-37378a0b20d068f5704486dbd03b3f4099442965.tar.gz |
Remove StgLam
StgLam is used exclusively in the work of CoreToStg, but there's nothing
in the type of StgExpr that indicates this, so we're forced throughout
the Stg.* codebase to handle cases like:
case expr of
...
StgLam lam -> panic "Unexpected StgLam"
...
This patch removes the StgLam constructor from the base StgExpr so these
cases no longer need to be handled. Instead, we use a new intermediate
type in CoreToStg, PreStgRhs, to represent the RHS expression of a
binding.
Diffstat (limited to 'compiler/GHC/Stg/Lint.hs')
-rw-r--r-- | compiler/GHC/Stg/Lint.hs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/compiler/GHC/Stg/Lint.hs b/compiler/GHC/Stg/Lint.hs index 1485a11458..742b29ee71 100644 --- a/compiler/GHC/Stg/Lint.hs +++ b/compiler/GHC/Stg/Lint.hs @@ -192,10 +192,6 @@ lintStgExpr app@(StgConApp con args _arg_tys) = do lintStgExpr (StgOpApp _ args _) = mapM_ lintStgArg args -lintStgExpr lam@(StgLam _ _) = do - opts <- getStgPprOpts - addErrL (text "Unexpected StgLam" <+> pprStgExpr opts lam) - lintStgExpr (StgLet _ binds body) = do binders <- lintStgBinds NotTopLevel binds addLoc (BodyOfLetRec binders) $ |