summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-05-07 10:00:41 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-05-21 12:17:30 -0400
commitcb4231db322f4a2bb146c456852df6cdf1498dca (patch)
treeb12c25fc3249c09a47e8cf356812697d3ad82311
parent510e04515bb3eaed95d374d685b5322ad7e6389d (diff)
downloadhaskell-cb4231db322f4a2bb146c456852df6cdf1498dca.tar.gz
Tiny cleaup eta-reduce away a function argument
In GHC, not in the code being compiled!
-rw-r--r--compiler/GHC/Tc/Gen/Pat.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Tc/Gen/Pat.hs b/compiler/GHC/Tc/Gen/Pat.hs
index 104656dd9e..2480835729 100644
--- a/compiler/GHC/Tc/Gen/Pat.hs
+++ b/compiler/GHC/Tc/Gen/Pat.hs
@@ -453,7 +453,7 @@ tc_pat pat_ty penv ps_pat thing_inside = case ps_pat of
-- Lists, tuples, arrays
ListPat Nothing pats -> do
{ (coi, elt_ty) <- matchExpectedPatTy matchExpectedListTy penv pat_ty
- ; (pats', res) <- tcMultiple (\p -> tc_lpat (mkCheckExpType elt_ty) p)
+ ; (pats', res) <- tcMultiple (tc_lpat $ mkCheckExpType elt_ty)
penv pats thing_inside
; pat_ty <- readExpType pat_ty
; return (mkHsWrapPat coi
@@ -466,7 +466,7 @@ tc_pat pat_ty penv ps_pat thing_inside = case ps_pat of
<- tcSyntaxOpGen ListOrigin e [SynType (mkCheckExpType tau_pat_ty)]
SynList $
\ [elt_ty] ->
- do { (pats', res) <- tcMultiple (\p -> tc_lpat (mkCheckExpType elt_ty) p)
+ do { (pats', res) <- tcMultiple (tc_lpat $ mkCheckExpType elt_ty)
penv pats thing_inside
; return (pats', res, elt_ty) }
; return (ListPat (ListPatTc elt_ty (Just (tau_pat_ty,e'))) pats', res)