{-# LANGUAGE CPP #-}
#if !MIN_VERSION_base(4,9,0)
{-# LANGUAGE MagicHash, Rank2Types, UnboxedTuples #-}
#endif
module Data.HashMap.Unsafe
( runST
) where
#if MIN_VERSION_base(4,9,0)
import Control.Monad.ST
#else
import GHC.Base (realWorld#)
import qualified GHC.ST as ST
runST :: (forall s. ST.ST s a) -> a
runST st = runSTRep (case st of { ST.ST st_rep -> st_rep })
{-# INLINE runST #-}
runSTRep :: (forall s. ST.STRep s a) -> a
runSTRep st_rep = case st_rep realWorld# of
(# _, r #) -> r
{-# INLINE [0] runSTRep #-}
#endif