X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FWeak.lhs;h=4897123cd59c415bb275fbabb36c581aae43586d;hb=566d4ea2e4434bf0bedfaa518c31bca42959855d;hp=d76c8b6e9af323ee36e3199718827cc7e898f1d1;hpb=25ee14a12578b3078f0666861fece70fff6e0819;p=ghc-base.git diff --git a/GHC/Weak.lhs b/GHC/Weak.lhs index d76c8b6..4897123 100644 --- a/GHC/Weak.lhs +++ b/GHC/Weak.lhs @@ -1,5 +1,5 @@ \begin{code} -{-# OPTIONS_GHC -fno-implicit-prelude #-} +{-# OPTIONS_GHC -XNoImplicitPrelude #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | @@ -20,8 +20,7 @@ module GHC.Weak where import GHC.Base import Data.Maybe -import GHC.IOBase ( IO(..), unIO ) -import Data.Typeable ( Typeable1(..), mkTyCon, mkTyConApp ) +import Data.Typeable {-| A weak pointer object with a key and a value. The value has type @v@. @@ -123,10 +122,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