Remove a hack for GHC 3.03 in SimplMonad
authorIan Lynagh <igloo@earth.li>
Sun, 4 May 2008 20:59:35 +0000 (20:59 +0000)
committerIan Lynagh <igloo@earth.li>
Sun, 4 May 2008 20:59:35 +0000 (20:59 +0000)
compiler/simplCore/SimplMonad.lhs

index be51d7d..a4e7ef4 100644 (file)
@@ -32,7 +32,7 @@ import UniqSupply
 import DynFlags                ( SimplifierSwitch(..), DynFlags, DynFlag(..), dopt )
 import StaticFlags     ( opt_PprStyle_Debug, opt_HistorySize )
 import Maybes          ( expectJust )
-import FiniteMap       ( FiniteMap, emptyFM, isEmptyFM, lookupFM, addToFM, plusFM_C, fmToList )
+import FiniteMap       ( FiniteMap, emptyFM, lookupFM, addToFM, plusFM_C, fmToList )
 import FastString
 import Outputable
 import FastTypes
@@ -205,16 +205,9 @@ isZeroSimplCount (SimplCount { ticks = 0 }) = True
 isZeroSimplCount _                         = False
 
 doFreeTick tick sc@SimplCount { details = dts } 
-  = dts' `seqFM` sc { details = dts' }
-  where
-    dts' = dts `addTick` tick 
+  = sc { details = dts `addTick` tick }
 doFreeTick _ sc = sc 
 
--- Gross hack to persuade GHC 3.03 to do this important seq
-seqFM :: FiniteMap key elt -> t -> t
-seqFM fm x | isEmptyFM fm = x
-          | otherwise    = x
-
 doTick tick sc@SimplCount { ticks = tks, details = dts, n_log = nl, log1 = l1 }
   | nl >= opt_HistorySize = sc1 { n_log = 1, log1 = [tick], log2 = l1 }
   | otherwise            = sc1 { n_log = nl+1, log1 = tick : l1 }