summaryrefslogtreecommitdiff
path: root/compiler/deSugar
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2008-06-05 14:56:17 +0000
committersimonpj@microsoft.com <unknown>2008-06-05 14:56:17 +0000
commit4edf8929c0007b6626c32e382a337afc2c8a75ab (patch)
tree873581f3761ffa4aeabf3d9c4f1e1b53487a393c /compiler/deSugar
parent9aa2708bf96c82e255fd3c9cb0a07af2cceb296b (diff)
downloadhaskell-4edf8929c0007b6626c32e382a337afc2c8a75ab.tar.gz
Fix Trac #2045: use big-tuple machiney for implication constraints
Diffstat (limited to 'compiler/deSugar')
-rw-r--r--compiler/deSugar/DsUtils.lhs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/deSugar/DsUtils.lhs b/compiler/deSugar/DsUtils.lhs
index 553b468832..cf171ce537 100644
--- a/compiler/deSugar/DsUtils.lhs
+++ b/compiler/deSugar/DsUtils.lhs
@@ -797,17 +797,18 @@ mkLHsVarTup ids = mkLHsTup (map nlHsVar ids)
mkLHsTup :: [LHsExpr Id] -> LHsExpr Id
mkLHsTup [] = nlHsVar unitDataConId
mkLHsTup [lexp] = lexp
-mkLHsTup lexps = noLoc $ ExplicitTuple lexps Boxed
-
+mkLHsTup lexps = L (getLoc (head lexps)) $
+ ExplicitTuple lexps Boxed
-- Smart constructors for source tuple patterns
mkLHsVarPatTup :: [Id] -> LPat Id
mkLHsVarPatTup bs = mkLHsPatTup (map nlVarPat bs)
mkLHsPatTup :: [LPat Id] -> LPat Id
+mkLHsPatTup [] = noLoc $ mkVanillaTuplePat [] Boxed
mkLHsPatTup [lpat] = lpat
-mkLHsPatTup lpats = noLoc $ mkVanillaTuplePat lpats Boxed -- Handles the case where lpats = [] gracefully
-
+mkLHsPatTup lpats = L (getLoc (head lpats)) $
+ mkVanillaTuplePat lpats Boxed
-- The Big equivalents for the source tuple expressions
mkBigLHsVarTup :: [Id] -> LHsExpr Id
@@ -823,7 +824,6 @@ mkBigLHsVarPatTup bs = mkBigLHsPatTup (map nlVarPat bs)
mkBigLHsPatTup :: [LPat Id] -> LPat Id
mkBigLHsPatTup = mkBigTuple mkLHsPatTup
-
\end{code}