Refactor the FPTOOLS_CHECK_HTYPE macro
[ghc-base.git] / GHC / ST.lhs
index dc62000..a66a5f8 100644 (file)
@@ -20,6 +20,7 @@ module GHC.ST where
 
 import GHC.Base
 import GHC.Show
+import Control.Monad( forever )
 
 default ()
 \end{code}
@@ -74,6 +75,9 @@ instance Monad (ST s) where
 
 data STret s a = STret (State# s) a
 
+{-# SPECIALISE forever :: ST s a -> ST s b #-}
+-- See Note [Make forever INLINABLE] in Control.Monad
+
 -- liftST is useful when we want a lifted result from an ST computation.  See
 -- fixST below.
 liftST :: ST s a -> State# s -> STret s a