summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@cs.brynmawr.edu>2017-08-16 11:35:26 -0400
committerBen Gamari <ben@smart-cactus.org>2017-09-14 14:28:24 -0400
commitfa626f3b1c1140a1f10bba60fdde10f767863f70 (patch)
tree007c85563bd0b207df07156bfb22847a06565057 /compiler
parente5beb6ecac1497972fd538fd9a60c75e9279d68f (diff)
downloadhaskell-fa626f3b1c1140a1f10bba60fdde10f767863f70.tar.gz
Fix #13929 by adding another levity polymorphism check
test case: typecheck/should_fail/T13929
Diffstat (limited to 'compiler')
-rw-r--r--compiler/deSugar/DsExpr.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/deSugar/DsExpr.hs b/compiler/deSugar/DsExpr.hs
index 2d86b8438a..b8ed3c5fbf 100644
--- a/compiler/deSugar/DsExpr.hs
+++ b/compiler/deSugar/DsExpr.hs
@@ -368,14 +368,13 @@ ds_expr _ (ExplicitTuple tup_args boxity)
go (lam_vars, args) (L _ (Present expr))
-- Expressions that are present don't generate
-- lambdas, just arguments.
- = do { core_expr <- dsLExpr expr
+ = do { core_expr <- dsLExprNoLP expr
; return (lam_vars, core_expr : args) }
- ; (lam_vars, args) <- foldM go ([], []) (reverse tup_args)
+ ; dsWhenNoErrs (foldM go ([], []) (reverse tup_args))
-- The reverse is because foldM goes left-to-right
-
- ; return $ mkCoreLams lam_vars $
- mkCoreTupBoxity boxity args }
+ (\(lam_vars, args) -> mkCoreLams lam_vars $
+ mkCoreTupBoxity boxity args) }
ds_expr _ (ExplicitSum alt arity expr types)
= do { core_expr <- dsLExpr expr