-IMP_Ubiq()
-#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ <= 201
-IMPORT_DELOOPER(TyLoop) ( GenId, Id(..), TyCon ) -- Used inside Names
-#else
-import {-# SOURCE #-} Id ( Id )
-import {-# SOURCE #-} TyCon ( TyCon )
-#endif
-
-import CStrings ( identToC, modnameToC, cSEP )
-import CmdLineOpts ( opt_OmitInterfacePragmas, opt_EnsureSplittableC )
-import BasicTypes ( SYN_IE(Module), moduleString, pprModule )
-
-import Outputable ( Outputable(..), PprStyle(..), codeStyle, ifaceStyle )
-import PrelMods ( gHC__ )
-import Pretty
-import Lex ( isLexSym, isLexConId )
-import SrcLoc ( noSrcLoc, SrcLoc )
-import Usage ( SYN_IE(UVar), SYN_IE(Usage) )
-import Unique ( pprUnique, showUnique, Unique )
-import UniqSet ( UniqSet(..), emptyUniqSet, unitUniqSet, unionUniqSets, uniqSetToList, isEmptyUniqSet,
- unionManyUniqSets, minusUniqSet, mkUniqSet, elementOfUniqSet, addListToUniqSet, addOneToUniqSet )
-import UniqFM ( UniqFM, Uniquable(..) )
-import Util --( cmpPString, panic, assertPanic {-, pprTrace ToDo:rm-} )
-
-\end{code}
-
-
-%************************************************************************
-%* *
-\subsection[Name-pieces-datatypes]{The @OccName@ datatypes}
-%* *
-%************************************************************************
-
-\begin{code}
-data OccName = VarOcc FAST_STRING -- Variables and data constructors
- | TvOcc FAST_STRING -- Type variables
- | TCOcc FAST_STRING -- Type constructors and classes
-
-pprOccName :: PprStyle -> OccName -> Doc
-pprOccName sty n = if codeStyle sty
- then identToC (occNameString n)
- else ptext (occNameString n)
-
-occNameString :: OccName -> FAST_STRING
-occNameString (VarOcc s) = s
-occNameString (TvOcc s) = s
-occNameString (TCOcc s) = s
-
-prefixOccName :: FAST_STRING -> OccName -> OccName
-prefixOccName prefix (VarOcc s) = VarOcc (prefix _APPEND_ s)
-prefixOccName prefix (TvOcc s) = TvOcc (prefix _APPEND_ s)
-prefixOccName prefix (TCOcc s) = TCOcc (prefix _APPEND_ s)
-
--- occNameFlavour is used only to generate good error messages, so it doesn't matter
--- that the VarOcc case isn't mega-efficient. We could have different Occ constructors for
--- data constructors and values, but that makes everything else a bit more complicated.
-occNameFlavour :: OccName -> String
-occNameFlavour (VarOcc s) | isLexConId s = "Data constructor"
- | otherwise = "Value"
-occNameFlavour (TvOcc s) = "Type variable"
-occNameFlavour (TCOcc s) = "Type constructor or class"
-
-isVarOcc, isTCOcc, isTvOcc :: OccName -> Bool
-isVarOcc (VarOcc s) = True
-isVarOcc other = False
-
-isTvOcc (TvOcc s) = True
-isTvOcc other = False
-
-isTCOcc (TCOcc s) = True
-isTCOcc other = False
-
-
-instance Eq OccName where
- a == b = case (a `cmp` b) of { EQ_ -> True; _ -> False }
- a /= b = case (a `cmp` b) of { EQ_ -> False; _ -> True }
-
-instance Ord OccName where
- a <= b = case (a `cmp` b) of { LT_ -> True; EQ_ -> True; GT__ -> False }
- a < b = case (a `cmp` b) of { LT_ -> True; EQ_ -> False; GT__ -> False }
- a >= b = case (a `cmp` b) of { LT_ -> False; EQ_ -> True; GT__ -> True }
- a > b = case (a `cmp` b) of { LT_ -> False; EQ_ -> False; GT__ -> True }
-
-instance Ord3 OccName where
- cmp = cmpOcc
-
-(VarOcc s1) `cmpOcc` (VarOcc s2) = s1 `_CMP_STRING_` s2
-(VarOcc s1) `cmpOcc` other2 = LT_
-
-(TvOcc s1) `cmpOcc` (VarOcc s2) = GT_
-(TvOcc s1) `cmpOcc` (TvOcc s2) = s1 `_CMP_STRING_` s2
-(TvOcc s1) `cmpOcc` other = LT_
-
-(TCOcc s1) `cmpOcc` (TCOcc s2) = s1 `_CMP_STRING_` s2
-(TCOcc s1) `cmpOcc` other = GT_
-
-instance Outputable OccName where
- ppr = pprOccName
-\end{code}
-