summaryrefslogtreecommitdiff
path: root/compiler/GHC/ThToHs.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/ThToHs.hs')
-rw-r--r--compiler/GHC/ThToHs.hs9
1 files changed, 1 insertions, 8 deletions
diff --git a/compiler/GHC/ThToHs.hs b/compiler/GHC/ThToHs.hs
index f49d6ff0b2..8c3e6a5f1e 100644
--- a/compiler/GHC/ThToHs.hs
+++ b/compiler/GHC/ThToHs.hs
@@ -1368,12 +1368,7 @@ cvtTypeKind ty_str ty
TupleT n
| Just normals <- m_normals
, normals `lengthIs` n -- Saturated
- -> if n==1 then return (head normals) -- Singleton tuples treated
- -- like nothing (ie just parens)
- else returnL (HsTupleTy noExtField
- HsBoxedOrConstraintTuple normals)
- | n == 1
- -> failWith (ptext (sLit ("Illegal 1-tuple " ++ ty_str ++ " constructor")))
+ -> returnL (HsTupleTy noExtField HsBoxedOrConstraintTuple normals)
| otherwise
-> mk_apps
(HsTyVar noExtField NotPromoted (noLoc (getRdrName (tupleTyCon Boxed n))))
@@ -1491,8 +1486,6 @@ cvtTypeKind ty_str ty
-- Promoted data constructor; hence cName
PromotedTupleT n
- | n == 1
- -> failWith (ptext (sLit ("Illegal promoted 1-tuple " ++ ty_str)))
| Just normals <- m_normals
, normals `lengthIs` n -- Saturated
-> returnL (HsExplicitTupleTy noExtField normals)