[commit: ghc] master: Fix #5332 (more): unboxed singleton tuples are fine (9f095a4)
Simon Peyton Jones
simonpj at microsoft.com
Wed Jul 20 11:16:26 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/9f095a456eefbf9752ca773ecba148b471586cf0
>---------------------------------------------------------------
commit 9f095a456eefbf9752ca773ecba148b471586cf0
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Jul 20 10:15:52 2011 +0100
Fix #5332 (more): unboxed singleton tuples are fine
This patch fixes the unboxed singleton tuples in types and patterns
>---------------------------------------------------------------
compiler/hsSyn/Convert.lhs | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/compiler/hsSyn/Convert.lhs b/compiler/hsSyn/Convert.lhs
index 7c5cd36..f867b96 100644
--- a/compiler/hsSyn/Convert.lhs
+++ b/compiler/hsSyn/Convert.lhs
@@ -630,7 +630,6 @@ cvtp (TH.LitP l)
cvtp (TH.VarP s) = do { s' <- vName s; return $ Hs.VarPat s' }
cvtp (TupP [p]) = cvtp p
cvtp (TupP ps) = do { ps' <- cvtPats ps; return $ TuplePat ps' Boxed void }
-cvtp (UnboxedTupP [p]) = cvtp p
cvtp (UnboxedTupP ps) = do { ps' <- cvtPats ps; return $ TuplePat ps' Unboxed void }
cvtp (ConP s ps) = do { s' <- cNameL s; ps' <- cvtPats ps; return $ ConPatIn s' (PrefixCon ps') }
cvtp (InfixP p1 s p2) = do { s' <- cNameL s; p1' <- cvtPat p1; p2' <- cvtPat p2
@@ -708,8 +707,6 @@ cvtType ty
-> if n==1 then return (head tys') -- Singleton tuples treated
-- like nothing (ie just parens)
else returnL (HsTupleTy Unboxed tys')
- | n == 1
- -> failWith (ptext (sLit "Illegal 1-unboxed-tuple type constructor"))
| otherwise
-> mk_apps (HsTyVar (getRdrName (tupleTyCon Unboxed n))) tys'
ArrowT
More information about the Cvs-ghc
mailing list