diff options
author | Richard Eisenberg <rae@cs.brynmawr.edu> | 2017-08-16 11:35:26 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-09-14 14:28:24 -0400 |
commit | fa626f3b1c1140a1f10bba60fdde10f767863f70 (patch) | |
tree | 007c85563bd0b207df07156bfb22847a06565057 /compiler | |
parent | e5beb6ecac1497972fd538fd9a60c75e9279d68f (diff) | |
download | haskell-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.hs | 9 |
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 |