summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2022-04-18 16:55:22 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-05-02 18:29:23 -0400
commit3e400f204e2b88c501c734f2c4244910ffc0d5dc (patch)
tree62caeaec6706457f82b818ffa21873bd46385534
parentfc58df907aac1177b1fd2ec43694fd492ce170da (diff)
downloadhaskell-3e400f204e2b88c501c734f2c4244910ffc0d5dc.tar.gz
Remove obsolete code in CoreToStg
Note [Nullary unboxed tuple] was removed in e9e61f18a548b70693f4. This codepath is tested by T15696_3.
-rw-r--r--compiler/GHC/CoreToStg.hs10
-rw-r--r--testsuite/tests/linters/notes.stdout1
2 files changed, 0 insertions, 11 deletions
diff --git a/compiler/GHC/CoreToStg.hs b/compiler/GHC/CoreToStg.hs
index 268c427f09..053fd2dcf9 100644
--- a/compiler/GHC/CoreToStg.hs
+++ b/compiler/GHC/CoreToStg.hs
@@ -49,7 +49,6 @@ import GHC.Types.Demand ( isUsedOnceDmd )
import GHC.Types.SrcLoc ( mkGeneralSrcSpan )
import GHC.Unit.Module
-import GHC.Builtin.Types ( unboxedUnitDataCon )
import GHC.Data.FastString
import GHC.Platform.Ways
import GHC.Builtin.PrimOps ( PrimCall(..) )
@@ -462,15 +461,6 @@ coreToStgExpr (Case scrut bndr _ alts)
where
vars_alt :: CoreAlt -> CtsM StgAlt
vars_alt (Alt con binders rhs)
- | DataAlt c <- con, c == unboxedUnitDataCon
- = -- This case is a bit smelly.
- -- See Note [Nullary unboxed tuple] in GHC.Core.Type
- -- where a nullary tuple is mapped to (State# World#)
- assert (null binders) $
- do { rhs2 <- coreToStgExpr rhs
- ; return GenStgAlt{alt_con=DEFAULT,alt_bndrs=mempty,alt_rhs=rhs2}
- }
- | otherwise
= let -- Remove type variables
binders' = filterStgBinders binders
in
diff --git a/testsuite/tests/linters/notes.stdout b/testsuite/tests/linters/notes.stdout
index 2ce1e21ae1..0086048082 100644
--- a/testsuite/tests/linters/notes.stdout
+++ b/testsuite/tests/linters/notes.stdout
@@ -22,7 +22,6 @@ ref compiler/GHC/Core/Unfold.hs:1242:50: Note [Unfold info lazy contexts]
ref compiler/GHC/Core/Unfold/Make.hs:157:34: Note [DFunUnfoldings]
ref compiler/GHC/Core/Unify.hs:1390:9: Note [INLINE pragmas and (>>)]
ref compiler/GHC/Core/Utils.hs:947:40: Note [ _ -> [con1]
-ref compiler/GHC/CoreToStg.hs:462:15: Note [Nullary unboxed tuple]
ref compiler/GHC/Driver/Main.hs:1566:34: Note [simpleTidyPgm - mkBootModDetailsTc]
ref compiler/GHC/Driver/Session.hs:1947:36: Note [GHC.Driver.Main . Safe Haskell Inference]
ref compiler/GHC/Driver/Session.hs:3916:49: Note [Eta-reduction in -O0]