projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Data and Typeable instances to HsSyn
[ghc-hetmet.git]
/
compiler
/
basicTypes
/
Name.lhs
diff --git
a/compiler/basicTypes/Name.lhs
b/compiler/basicTypes/Name.lhs
index
c3a1bd1
..
f0cb443
100644
(file)
--- a/
compiler/basicTypes/Name.lhs
+++ b/
compiler/basicTypes/Name.lhs
@@
-69,12
+69,15
@@
module Name (
module OccName
) where
module OccName
) where
+#include "Typeable.h"
+
import {-# SOURCE #-} TypeRep( TyThing )
import OccName
import Module
import SrcLoc
import Unique
import {-# SOURCE #-} TypeRep( TyThing )
import OccName
import Module
import SrcLoc
import Unique
+import Util
import Maybes
import Binary
import StaticFlags
import Maybes
import Binary
import StaticFlags
@@
-83,6
+86,7
@@
import FastString
import Outputable
import Data.Array
import Outputable
import Data.Array
+import Data.Data
import Data.Word ( Word32 )
\end{code}
import Data.Word ( Word32 )
\end{code}
@@
-358,6
+362,14
@@
instance Uniquable Name where
instance NamedThing Name where
getName n = n
instance NamedThing Name where
getName n = n
+
+INSTANCE_TYPEABLE0(Name,nameTc,"Name")
+
+instance Data Name where
+ -- don't traverse?
+ toConstr _ = abstractConstr "Name"
+ gunfold _ _ = error "gunfold"
+ dataTypeOf _ = mkNoRepType "Name"
\end{code}
%************************************************************************
\end{code}
%************************************************************************