X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Futils%2FOutputable.lhs;h=5592b5511b8ecab6cd76de8dea2dcd8ab17de78f;hb=caa7c91dd13a69110a55d68b61967f8239de15ce;hp=8b52867677449241f93fa320d8bf9d05ecdb0693;hpb=23f40f0e9be6d4aa5cf9ea31d73f4013f8e7b4bd;p=ghc-hetmet.git diff --git a/ghc/compiler/utils/Outputable.lhs b/ghc/compiler/utils/Outputable.lhs index 8b52867..5592b55 100644 --- a/ghc/compiler/utils/Outputable.lhs +++ b/ghc/compiler/utils/Outputable.lhs @@ -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}