summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Lint.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Core/Lint.hs')
-rw-r--r--compiler/GHC/Core/Lint.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/GHC/Core/Lint.hs b/compiler/GHC/Core/Lint.hs
index 405f2c1116..55e47ab22a 100644
--- a/compiler/GHC/Core/Lint.hs
+++ b/compiler/GHC/Core/Lint.hs
@@ -1309,8 +1309,6 @@ lintCaseExpr scrut var alt_ty alts =
-- in GHC.Core
; let scrut_mult = varMult var
- ; alt_ty <- addLoc (CaseTy scrut) $
- lintValueType alt_ty
; var_ty <- addLoc (IdTy var) $
lintValueType (idType var)
@@ -1348,6 +1346,9 @@ lintCaseExpr scrut var alt_ty alts =
; lintBinder CaseBind var $ \_ ->
do { -- Check the alternatives
+
+ ; alt_ty <- addLoc (CaseTy scrut) $
+ lintValueType alt_ty
; alt_ues <- mapM (lintCoreAlt var scrut_ty scrut_mult alt_ty) alts
; let case_ue = (scaleUE scrut_mult scrut_ue) `addUE` supUEs alt_ues
; checkCaseAlts e scrut_ty alts