[project @ 2005-09-18 02:22:33 by dons]
[haskell-directory.git] / GHC / ST.lhs
index ebfb224..4bb4256 100644 (file)
@@ -14,6 +14,7 @@
 --
 -----------------------------------------------------------------------------
 
+-- #hide
 module GHC.ST where
 
 import GHC.Base
@@ -38,7 +39,7 @@ too many people got bitten by space leaks when it was lazy.
 -- by @s@, and returns a value of type @a@.
 -- The @s@ parameter is either
 --
--- * an unstantiated type variable (inside invocations of 'runST'), or
+-- * an uninstantiated type variable (inside invocations of 'runST'), or
 --
 -- * 'RealWorld' (inside invocations of 'Control.Monad.ST.stToIO').
 --
@@ -144,7 +145,14 @@ runST st = runSTRep (case st of { ST st_rep -> st_rep })
 -- I'm only letting runSTRep be inlined right at the end, in particular *after* full laziness
 -- That's what the "INLINE [0]" says.
 --             SLPJ Apr 99
-{-# INLINE [0] runSTRep #-}
+-- {-# INLINE [0] runSTRep #-}
+
+-- SDM: further to the above, inline phase 0 is run *before*
+-- full-laziness at the moment, which means that the above comment is
+-- invalid.  Inlining runSTRep doesn't make a huge amount of
+-- difference, anyway.  Hence:
+
+{-# NOINLINE runSTRep #-}
 runSTRep :: (forall s. STRep s a) -> a
 runSTRep st_rep = case st_rep realWorld# of
                        (# _, r #) -> r