X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FbasicTypes%2FOccName.lhs;h=9ff53f13400af5a2b0cc9b81fe2e7e510d1a1a9b;hp=172c7097b3e714e8fa301803aa4a4b32a6495597;hb=f278f0676579f67075033a4f9857715909c4b71e;hpb=ef6e8211dee59eb7fa80a242391b89b52bd57f80 diff --git a/compiler/basicTypes/OccName.lhs b/compiler/basicTypes/OccName.lhs index 172c709..9ff53f1 100644 --- a/compiler/basicTypes/OccName.lhs +++ b/compiler/basicTypes/OccName.lhs @@ -92,6 +92,8 @@ module OccName ( startsVarSym, startsVarId, startsConSym, startsConId ) where +#include "Typeable.h" + import Util import Unique import BasicTypes @@ -102,6 +104,7 @@ import Outputable import Binary import StaticFlags( opt_SuppressUniques ) import Data.Char +import Data.Data \end{code} \begin{code} @@ -227,6 +230,14 @@ instance Ord OccName where -- Compares lexicographically, *not* by Unique of the string compare (OccName sp1 s1) (OccName sp2 s2) = (s1 `compare` s2) `thenCmp` (sp1 `compare` sp2) + +INSTANCE_TYPEABLE0(OccName,occNameTc,"OccName") + +instance Data OccName where + -- don't traverse? + toConstr _ = abstractConstr "OccName" + gunfold _ _ = error "gunfold" + dataTypeOf _ = mkNoRepType "OccName" \end{code}