summaryrefslogtreecommitdiff
path: root/compiler/simplCore/SimplMonad.lhs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-05-04 20:59:35 +0000
committerIan Lynagh <igloo@earth.li>2008-05-04 20:59:35 +0000
commita425df1a4e65b24018db36d4f9b919fc8af3447e (patch)
treed0d2929f26584efa9c1d7bff54812597186444ac /compiler/simplCore/SimplMonad.lhs
parent4033c3e0f46673b3d1af253552583e94c663bff8 (diff)
downloadhaskell-a425df1a4e65b24018db36d4f9b919fc8af3447e.tar.gz
Remove a hack for GHC 3.03 in SimplMonad
Diffstat (limited to 'compiler/simplCore/SimplMonad.lhs')
-rw-r--r--compiler/simplCore/SimplMonad.lhs11
1 files changed, 2 insertions, 9 deletions
diff --git a/compiler/simplCore/SimplMonad.lhs b/compiler/simplCore/SimplMonad.lhs
index be51d7d684..a4e7ef48c2 100644
--- a/compiler/simplCore/SimplMonad.lhs
+++ b/compiler/simplCore/SimplMonad.lhs
@@ -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 }