+% ------------------------------------------------------------------------------
+% $Id: PrelST.lhs,v 1.21 2001/09/26 15:12:37 simonpj Exp $
%
-% (c) The GRASP/AQUA Project, Glasgow University, 1992-1996
+% (c) The University of Glasgow, 1992-2000
%
+
\section[PrelST]{The @ST@ monad}
\begin{code}
module PrelST where
-import PrelShow
import PrelBase
-import PrelGHC
-import PrelNum () -- So that we get the .hi file for system imports
+import PrelShow
+import PrelNum
default ()
\end{code}
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 100" says.
+-- That's what the "INLINE [0]" says.
-- SLPJ Apr 99
-{-# INLINE 100 runSTRep #-}
+{-# INLINE [0] runSTRep #-}
runSTRep :: (forall s. STRep s a) -> a
runSTRep st_rep = case st_rep realWorld# of
(# _, r #) -> r