Comments only
[ghc-hetmet.git] / compiler / basicTypes / DataCon.lhs
index 8f09078..f367ada 100644 (file)
@@ -54,6 +54,7 @@ import Util
 import FastString
 import Module
 
+import qualified Data.Data as Data
 import Data.Char
 import Data.Word
 import Data.List ( partition )
@@ -341,7 +342,8 @@ data DataCon
                                        -- after unboxing and flattening,
                                        -- and *including* existential dictionaries
 
-       dcRepStrictness :: [StrictnessMark],    -- One for each *representation* argument       
+       dcRepStrictness :: [StrictnessMark],    -- One for each *representation* 
+                                               -- *value* argument
                -- See also Note [Data-con worker strictness] in MkId.lhs
 
        -- Result type of constructor is T t1..tn
@@ -454,6 +456,15 @@ instance Outputable DataCon where
 
 instance Show DataCon where
     showsPrec p con = showsPrecSDoc p (ppr con)
+
+instance Data.Typeable DataCon where
+    typeOf _ = Data.mkTyConApp (Data.mkTyCon "DataCon") []
+
+instance Data.Data DataCon where
+    -- don't traverse?
+    toConstr _   = abstractConstr "DataCon"
+    gunfold _ _  = error "gunfold"
+    dataTypeOf _ = mkNoRepType "DataCon"
 \end{code}