- where
- do_tc Nothing = return Nothing
- do_tc (Just tc) = do { tc' <- lookupIfaceTc tc; return (Just tc') }
+
+tcIfaceFamInst :: IfaceFamInst -> IfL FamInst
+tcIfaceFamInst (IfaceFamInst { ifFamInstTyCon = tycon,
+ ifFamInstFam = fam, ifFamInstTys = mb_tcs })
+-- = do { tycon' <- forkM (ptext SLIT("Inst tycon") <+> ppr tycon) $
+-- ^^^this line doesn't work, but vvv this does => CPP in Haskell = evil!
+ = do { tycon' <- forkM (text ("Inst tycon") <+> ppr tycon) $
+ tcIfaceTyCon tycon
+ ; fam' <- lookupIfaceExt fam
+ ; mb_tcs' <- mapM tc_rough mb_tcs
+ ; return (mkImportedFamInst fam' mb_tcs' tycon') }
+
+tc_rough Nothing = return Nothing
+tc_rough (Just tc) = do { tc' <- lookupIfaceTc tc; return (Just tc') }