Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/aa6bc700cc07e21a8b6aa5816a8c63201b9b260e

>---------------------------------------------------------------

commit aa6bc700cc07e21a8b6aa5816a8c63201b9b260e
Author: Ian Lynagh <[email protected]>
Date:   Thu Sep 20 00:30:33 2012 +0100

    Remove a couple of unneccesary Platform arguments

>---------------------------------------------------------------

 compiler/cmm/OldCmmLint.hs |    4 +---
 compiler/cmm/PprCmmDecl.hs |    9 +++------
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/compiler/cmm/OldCmmLint.hs b/compiler/cmm/OldCmmLint.hs
index 5dd3209..f158369 100644
--- a/compiler/cmm/OldCmmLint.hs
+++ b/compiler/cmm/OldCmmLint.hs
@@ -19,7 +19,6 @@ module OldCmmLint (
 
 import BlockId
 import OldCmm
-import CLabel
 import Outputable
 import OldPprCmm()
 import FastString
@@ -50,10 +49,9 @@ runCmmLint _ l p =
 
 lintCmmDecl :: DynFlags -> (GenCmmDecl h i (ListGraph CmmStmt)) -> CmmLint ()
 lintCmmDecl dflags (CmmProc _ lbl (ListGraph blocks))
-  = addLintInfo (text "in proc " <> pprCLabel platform lbl) $
+  = addLintInfo (text "in proc " <> ppr lbl) $
         let labels = foldl (\s b -> setInsert (blockId b) s) setEmpty blocks
         in  mapM_ (lintCmmBlock dflags labels) blocks
-    where platform = targetPlatform dflags
 
 lintCmmDecl _ (CmmData {})
   = return ()
diff --git a/compiler/cmm/PprCmmDecl.hs b/compiler/cmm/PprCmmDecl.hs
index d2491d3..2cb90e9 100644
--- a/compiler/cmm/PprCmmDecl.hs
+++ b/compiler/cmm/PprCmmDecl.hs
@@ -38,13 +38,11 @@ module PprCmmDecl
     )
 where
 
-import CLabel
 import PprCmmExpr
 import Cmm
 
 import DynFlags
 import Outputable
-import Platform
 import FastString
 
 import Data.List
@@ -72,7 +70,7 @@ instance (Outputable d, Outputable info, Outputable i)
     ppr t = pprTop t
 
 instance Outputable CmmStatics where
-    ppr x = sdocWithPlatform $ \platform -> pprStatics platform x
+    ppr = pprStatics
 
 instance Outputable CmmStatic where
     ppr = pprStatic
@@ -141,9 +139,8 @@ instance Outputable ForeignHint where
 --      Strings are printed as C strings, and we print them as I8[],
 --      following C--
 --
-pprStatics :: Platform -> CmmStatics -> SDoc
-pprStatics platform (Statics lbl ds)
-    = vcat ((pprCLabel platform lbl <> colon) : map ppr ds)
+pprStatics :: CmmStatics -> SDoc
+pprStatics (Statics lbl ds) = vcat ((ppr lbl <> colon) : map ppr ds)
 
 pprStatic :: CmmStatic -> SDoc
 pprStatic s = case s of



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to