+ from_here
+ = case maybe_CompilingGhcInternals of
+ Nothing -> False
+ Just mod -> mod == _UNPK_ m
+
+mkCompoundName :: Unique
+ -> Module
+ -> FAST_STRING -- indicates what kind of compound thing it is (e.g., "sdsel")
+ -> [Either OrigName FAST_STRING] -- "dot" these names together
+ -> Name -- from which we get provenance, etc....
+ -> Name -- result!
+
+mkCompoundName u m str ns (Local _ _ _ locn) -- these arise for workers...
+ = Local u str True{-emph uniq-} locn
+
+mkCompoundName u m str ns (Global _ _ _ prov exp _)
+ = Global u m (Right (Right str : ns)) prov exp []
+
+glue = glue1
+glue1 (Left (OrigName m n):ns) = m : _CONS_ '.' n : glue2 ns
+glue1 (Right n :ns) = n : glue2 ns
+glue2 [] = []
+glue2 (Left (OrigName m n):ns) = _CONS_ '.' m : _CONS_ '.' n : glue2 ns
+glue2 (Right n :ns) = _CONS_ '.' n : glue2 ns
+
+-- this ugly one is used for instance-y things
+mkCompoundName2 :: Unique
+ -> Module
+ -> FAST_STRING -- indicates what kind of compound thing it is
+ -> [Either OrigName FAST_STRING] -- "dot" these names together
+ -> Bool -- True <=> defined in this module
+ -> SrcLoc
+ -> Name -- result!
+
+mkCompoundName2 u m str ns from_here locn
+ = Global u m (Right (Right str : ns))
+ (if from_here then LocalDef locn else Imported ExportAll locn [])
+ ExportAll{-instances-}
+ []