[project @ 2005-03-04 12:04:00 by simonmar]
[ghc-hetmet.git] / ghc / compiler / utils / Outputable.lhs
index 8b52867..5592b55 100644 (file)
@@ -51,10 +51,11 @@ module Outputable (
 #include "HsVersions.h"
 
 
-import {-# SOURCE #-}  Module( ModuleName )
+import {-# SOURCE #-}  Module( Module )
 import {-# SOURCE #-}  OccName( OccName )
 
 import CmdLineOpts     ( opt_PprStyle_Debug, opt_PprUserLength )
+import PackageConfig   ( PackageId, packageIdString )
 import FastString
 import qualified Pretty
 import Pretty          ( Doc, Mode(..) )
@@ -91,7 +92,7 @@ data Depth = AllTheWay
            | PartWay Int       -- 0 => stop
 
 
-type PrintUnqualified = ModuleName -> OccName -> Bool
+type PrintUnqualified = Module -> OccName -> Bool
        -- This function tells when it's ok to print 
        -- a (Global) name unqualified
 
@@ -356,6 +357,9 @@ instance (Outputable a, Outputable b, Outputable c, Outputable d) =>
 instance Outputable FastString where
     ppr fs = text (unpackFS fs)                -- Prints an unadorned string,
                                        -- no double quotes or anything
+
+instance Outputable PackageId where
+   ppr pid = text (packageIdString pid)
 \end{code}