[project @ 2005-07-26 08:16:24 by simonpj]
[ghc-hetmet.git] / ghc / compiler / types / TyCon.lhs
index ffad3ce..3bec98d 100644 (file)
@@ -178,6 +178,7 @@ data AlgTyConRhs
                        -- INVARIANT: Kept in order of increasing tag
                        --            (see the tag assignment in DataCon.mkDataCon)
        Bool            -- Cached: True <=> an enumeration type
+                       --         Includes data types with no constructors.
 
   | NewTyCon           -- Newtypes always have exactly one constructor
        DataCon         -- The unique constructor; it has no existentials
@@ -437,6 +438,11 @@ isTupleTyCon :: TyCon -> Bool
 -- The unit tycon didn't used to be classed as a tuple tycon
 -- but I thought that was silly so I've undone it
 -- If it can't be for some reason, it should be a AlgTyCon
+--
+-- NB: when compiling Data.Tuple, the tycons won't reply True to
+-- isTupleTyCon, becuase they are built as AlgTyCons.  However they
+-- get spat into the interface file as tuple tycons, so I don't think
+-- it matters.
 isTupleTyCon (TupleTyCon {}) = True
 isTupleTyCon other          = False