From a425df1a4e65b24018db36d4f9b919fc8af3447e Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sun, 4 May 2008 20:59:35 +0000 Subject: [PATCH] Remove a hack for GHC 3.03 in SimplMonad --- compiler/simplCore/SimplMonad.lhs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/compiler/simplCore/SimplMonad.lhs b/compiler/simplCore/SimplMonad.lhs index be51d7d..a4e7ef4 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 } -- 1.7.10.4