-cvtType ty = do { (head, tys') <- split_ty_app ty
- ; case head of
- TupleT n | length tys' == n -> returnL (HsTupleTy Boxed tys')
- | n == 0 -> mk_apps (HsTyVar (getRdrName unitTyCon)) tys'
+cvtType ty = do { (head_ty, tys') <- split_ty_app ty
+ ; case head_ty of
+ TupleT n | length tys' == n -- Saturated
+ -> if n==1 then return (head tys') -- Singleton tuples treated
+ -- like nothing (ie just parens)
+ else returnL (HsTupleTy Boxed tys')
+ | n == 1 -> failWith (ptext (sLit "Illegal 1-tuple type constructor"))