[project @ 2005-01-27 10:44:00 by simonpj]
[ghc-hetmet.git] / ghc / compiler / iface / IfaceType.lhs
index 40cae9d..0ebfa0d 100644 (file)
@@ -9,7 +9,7 @@ module IfaceType (
        IfaceType(..), IfaceKind, IfacePredType(..), IfaceTyCon(..),
        IfaceContext, IfaceBndr(..), IfaceTvBndr, IfaceIdBndr,
 
-       IfaceExtName(..), mkIfaceExtName, ifaceTyConName, 
+       IfaceExtName(..), mkIfaceExtName, ifaceTyConName, ifPrintUnqual,
 
        -- Conversion from Type -> IfaceType
        toIfaceType, toIfacePred, toIfaceContext, 
@@ -65,6 +65,11 @@ data IfaceExtName
 
 mkIfaceExtName name = ExtPkg (nameModule name) (nameOccName name)
        -- Local helper for wired-in names
+
+ifPrintUnqual :: PrintUnqualified -> IfaceExtName -> Bool
+ifPrintUnqual print_unqual (ExtPkg  mod occ)   = print_unqual mod occ
+ifPrintUnqual print_unqual (HomePkg mod occ _) = print_unqual mod occ
+ifPrintUnqual print_unqual other              = True
 \end{code}