X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FWeak.lhs;h=92e1eb89b039f59a0f6232e9271091e35bcdb2d8;hb=7dbb606d7b57cdad87a0ffbdb6ea4a274ebca7c0;hp=66fefcdb9593b082adad7f6a09a43ddc829b3f9d;hpb=494543819fc0da09e4dfc30c0c88167ae1379ee5;p=ghc-base.git diff --git a/GHC/Weak.lhs b/GHC/Weak.lhs index 66fefcd..92e1eb8 100644 --- a/GHC/Weak.lhs +++ b/GHC/Weak.lhs @@ -1,6 +1,14 @@ \begin{code} -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# LANGUAGE CPP + , NoImplicitPrelude + , BangPatterns + , MagicHash + , UnboxedTuples + , DeriveDataTypeable + , StandaloneDeriving + #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.Weak @@ -20,7 +28,6 @@ module GHC.Weak where import GHC.Base import Data.Maybe -import GHC.IOBase ( IO(..), unIO ) import Data.Typeable {-| @@ -123,10 +130,10 @@ runFinalizerBatch (I# n) arr = let go m = IO $ \s -> case m of 0# -> (# s, () #) - _ -> let m' = m -# 1# in + _ -> let !m' = m -# 1# in case indexArray# arr m' of { (# io #) -> - case unIO io s of { (# s, _ #) -> - unIO (go m') s + case unIO io s of { (# s', _ #) -> + unIO (go m') s' }} in go n