FIX dynamic001 dynamic002: isTupleTyCon had rotted
authorSimon Marlow <simonmar@microsoft.com>
Tue, 5 Feb 2008 10:39:04 +0000 (10:39 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Tue, 5 Feb 2008 10:39:04 +0000 (10:39 +0000)
In the patch "Tuple tycons have parens around their names", the names
of the tuple tycons were changed to include parens, but isTupleTyCon
was not updated to match, which made tuple types show as "(,) a b"
rather than "(a,b)"

Data/Typeable.hs

index f94fff8..3a85c33 100644 (file)
@@ -283,8 +283,8 @@ instance Show TyCon where
   showsPrec _ (TyCon _ s) = showString s
 
 isTupleTyCon :: TyCon -> Bool
-isTupleTyCon (TyCon _ (',':_)) = True
-isTupleTyCon _                = False
+isTupleTyCon (TyCon _ ('(':',':_)) = True
+isTupleTyCon _                    = False
 
 -- Some (Show.TypeRep) helpers: