[commit: ghc] wip/T10137: Avoid Data.Functor (ca3b167)

git at git.haskell.org git at git.haskell.org
Tue Mar 10 22:51:21 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T10137
Link       : http://ghc.haskell.org/trac/ghc/changeset/ca3b167807cf2dfc63aed024431336a77e3b6869/ghc

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

commit ca3b167807cf2dfc63aed024431336a77e3b6869
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Tue Mar 10 23:50:56 2015 +0100

    Avoid Data.Functor
    
    as I did not manage to make it compile with -Wall


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

ca3b167807cf2dfc63aed024431336a77e3b6869
 compiler/cmm/CmmCreateSwitchPlans.hs | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/compiler/cmm/CmmCreateSwitchPlans.hs b/compiler/cmm/CmmCreateSwitchPlans.hs
index 9b0f589..089839d 100644
--- a/compiler/cmm/CmmCreateSwitchPlans.hs
+++ b/compiler/cmm/CmmCreateSwitchPlans.hs
@@ -4,8 +4,6 @@ module CmmCreateSwitchPlans
   )
 where
 
-import Data.Functor ((<$>))
-
 import Hoopl
 import BlockId
 import Cmm
@@ -13,8 +11,6 @@ import CmmUtils
 import CmmSwitch
 import UniqSupply
 import DynFlags
-import Prelude
-
 
 --
 -- This module replaces Switch statements as generated by the Stg -> Cmm
@@ -32,7 +28,7 @@ import Prelude
 
 cmmCreateSwitchPlans :: DynFlags -> CmmGraph -> UniqSM CmmGraph
 cmmCreateSwitchPlans dflags g = do
-    blocks' <- concat <$> mapM (visitSwitches dflags) (toBlockList g)
+    blocks' <- concat `fmap` mapM (visitSwitches dflags) (toBlockList g)
     return $ ofBlockList (g_entry g) blocks'
 
 visitSwitches :: DynFlags -> CmmBlock -> UniqSM [CmmBlock]
@@ -84,7 +80,7 @@ implementSwitchPlan dflags scope expr = go
       = return (l, [])
     go' p
       = do
-        bid <- mkBlockId <$> getUniqueM
+        bid <- mkBlockId `fmap` getUniqueM
         (last, newBlocks) <- go p
         let block = CmmEntry bid scope `blockJoinHead` last
         return (bid, block: newBlocks)



More information about the ghc-commits mailing list