X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Futils%2FOutputable.lhs;h=22856f1a28204b108b43ae433bd22da19825359d;hb=4e3255388e8b99ccdae290bfcb6cd666b8c93d4a;hp=76c91d4b787e4a2827a4ec795261437efa63e867;hpb=d32c5227315009f38355fe3233f0f4e5b1f61dc6;p=ghc-hetmet.git diff --git a/ghc/compiler/utils/Outputable.lhs b/ghc/compiler/utils/Outputable.lhs index 76c91d4..22856f1 100644 --- a/ghc/compiler/utils/Outputable.lhs +++ b/ghc/compiler/utils/Outputable.lhs @@ -51,7 +51,8 @@ module Outputable ( #include "HsVersions.h" -import {-# SOURCE #-} Name( Name ) +import {-# SOURCE #-} Module( ModuleName ) +import {-# SOURCE #-} OccName( OccName ) import CmdLineOpts ( opt_PprStyle_Debug, opt_PprUserLength ) import FastString @@ -90,13 +91,13 @@ data Depth = AllTheWay | PartWay Int -- 0 => stop -type PrintUnqualified = Name -> Bool +type PrintUnqualified = ModuleName -> OccName -> Bool -- This function tells when it's ok to print -- a (Global) name unqualified alwaysQualify,neverQualify :: PrintUnqualified -alwaysQualify n = False -neverQualify n = True +alwaysQualify m n = False +neverQualify m n = True defaultUserStyle = mkUserStyle alwaysQualify AllTheWay @@ -149,9 +150,9 @@ getPprStyle df sty = df sty sty \end{code} \begin{code} -unqualStyle :: PprStyle -> Name -> Bool -unqualStyle (PprUser unqual _) n = unqual n -unqualStyle other n = False +unqualStyle :: PprStyle -> PrintUnqualified +unqualStyle (PprUser unqual _) m n = unqual m n +unqualStyle other m n = False codeStyle :: PprStyle -> Bool codeStyle (PprCode _) = True