Remove another unnecessary Platform argument
authorIan Lynagh <ian@well-typed.com>
Sun, 5 Aug 2012 15:03:38 +0000 (16:03 +0100)
committerIan Lynagh <ian@well-typed.com>
Sun, 5 Aug 2012 15:03:38 +0000 (16:03 +0100)
compiler/deSugar/Coverage.lhs
compiler/deSugar/Desugar.lhs

index 4e04a29..d3fbe4c 100644 (file)
@@ -23,7 +23,6 @@ import VarSet
 import Data.List
 import FastString
 import HscTypes
-import Platform
 import StaticFlags
 import TyCon
 import Unique
@@ -1158,9 +1157,9 @@ static void hpc_init_Main(void)
  hs_hpc_module("Main",8,1150288664,_hpc_tickboxes_Main_hpc);}
 
 \begin{code}
-hpcInitCode :: Platform -> Module -> HpcInfo -> SDoc
-hpcInitCode _ (NoHpcInfo {}) = empty
-hpcInitCode platform this_mod (HpcInfo tickCount hashNo)
+hpcInitCode :: Module -> HpcInfo -> SDoc
+hpcInitCode _ (NoHpcInfo {}) = empty
+hpcInitCode this_mod (HpcInfo tickCount hashNo)
  = vcat
     [ text "static void hpc_init_" <> ppr this_mod
          <> text "(void) __attribute__((constructor));"
@@ -1178,7 +1177,7 @@ hpcInitCode platform this_mod (HpcInfo tickCount hashNo)
        ])
     ]
   where
-    tickboxes = pprCLabel platform (mkHpcTicksLabel $ this_mod)
+    tickboxes = ppr (mkHpcTicksLabel $ this_mod)
 
     module_name  = hcat (map (text.charToC) $
                          bytesFS (moduleNameFS (Module.moduleName this_mod)))
index 28b0582..5d0e83f 100644 (file)
@@ -96,7 +96,6 @@ deSugar hsc_env
                             tcg_hpc          = other_hpc_info })
 
   = do { let dflags = hsc_dflags hsc_env
-             platform = targetPlatform dflags
         ; showPass dflags "Desugar"
 
        -- Desugar the program
@@ -131,7 +130,7 @@ deSugar hsc_env
                           ; ds_rules <- mapMaybeM dsRule rules
                           ; ds_vects <- mapM dsVect vects
                           ; let hpc_init
-                                  | opt_Hpc   = hpcInitCode platform mod ds_hpc_info
+                                  | opt_Hpc   = hpcInitCode mod ds_hpc_info
                                   | otherwise = empty
                           ; return ( ds_ev_binds
                                    , foreign_prs `appOL` core_prs `appOL` spec_prs