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/StgToCmm | |
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/StgToCmm')
-rw-r--r-- | compiler/GHC/StgToCmm/Expr.hs | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/compiler/GHC/StgToCmm/Expr.hs b/compiler/GHC/StgToCmm/Expr.hs index 0048a4c9a2..7427547bf4 100644 --- a/compiler/GHC/StgToCmm/Expr.hs +++ b/compiler/GHC/StgToCmm/Expr.hs @@ -129,8 +129,6 @@ cgExpr (StgLetNoEscape _ binds expr) = cgExpr (StgCase expr bndr alt_type alts) = cgCase expr bndr alt_type alts -cgExpr (StgLam {}) = panic "cgExpr: StgLam" - ------------------------------------------------------------------------ -- Let no escape ------------------------------------------------------------------------ |