+-- | The children of a Name are the things that are abbreviated by the ".."
+-- notation in export lists. Specifically:
+-- TyCon Children are * data constructors
+-- * record field ids
+-- Class Children are * class operations
+-- Each child has the parent thing as its Parent
+data Parent = NoParent | ParentIs Name
+ deriving (Eq)
+
+instance Outputable Parent where
+ ppr NoParent = empty
+ ppr (ParentIs n) = ptext (sLit "parent:") <> ppr n
+
+
+plusParent :: Parent -> Parent -> Parent
+plusParent p1 p2 = ASSERT2( p1 == p2, parens (ppr p1) <+> parens (ppr p2) )
+ p1
+
+{- Why so complicated? -=chak
+plusParent :: Parent -> Parent -> Parent
+plusParent NoParent rel =
+ ASSERT2( case rel of { NoParent -> True; other -> False },
+ ptext (sLit "plusParent[NoParent]: ") <+> ppr rel )
+ NoParent
+plusParent (ParentIs n) rel =
+ ASSERT2( case rel of { ParentIs m -> n==m; other -> False },
+ ptext (sLit "plusParent[ParentIs]:") <+> ppr n <> comma <+> ppr rel )
+ ParentIs n
+ -}
+
+emptyGlobalRdrEnv :: GlobalRdrEnv