Move pprFastFilePath from SrcLoc to Outputable
authorIan Lynagh <igloo@earth.li>
Tue, 26 Aug 2008 14:44:52 +0000 (14:44 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 26 Aug 2008 14:44:52 +0000 (14:44 +0000)
compiler/basicTypes/SrcLoc.lhs
compiler/utils/Outputable.lhs

index a342c89..0789693 100644 (file)
@@ -71,7 +71,6 @@ module SrcLoc (
 import Util
 import Outputable
 import FastString
-import System.FilePath
 \end{code}
 
 %************************************************************************
@@ -166,9 +165,6 @@ cmpSrcLoc (SrcLoc s1 l1 c1) (SrcLoc s2 l2 c2)
   = (s1 `compare` s2) `thenCmp` (l1 `compare` l2) `thenCmp` (c1 `compare` c2)
 cmpSrcLoc (SrcLoc _ _ _) _other = GT
 
-pprFastFilePath :: FastString -> SDoc
-pprFastFilePath path = text $ normalise $ unpackFS path
-
 instance Outputable SrcLoc where
     ppr (SrcLoc src_path src_line src_col)
       = getPprStyle $ \ sty ->
index f476849..548dc2c 100644 (file)
@@ -41,6 +41,7 @@ module Outputable (
 
        pprInfixVar, pprPrefixVar,
        pprHsChar, pprHsString, pprHsInfix, pprHsVar,
+    pprFastFilePath,
 
         -- * Controlling the style in which output is printed
        BindingSite(..),
@@ -74,6 +75,7 @@ import Panic
 import Data.Word       ( Word32 )
 import System.IO       ( Handle, stderr, stdout, hFlush )
 import Data.Char        ( ord )
+import System.FilePath
 \end{code}
 
 
@@ -599,6 +601,9 @@ isOperator ppr_v
         ('_':_)   -> False              -- Not an operator
         (c:_)     -> not (isAlpha c)    -- Starts with non-alpha
         _         -> False
+
+pprFastFilePath :: FastString -> SDoc
+pprFastFilePath path = text $ normalise $ unpackFS path
 \end{code}
 
 %************************************************************************