相关疑难解决方法(0)

来自GHC.IO的`ioToST`和`unsafeIOToST`有什么区别?

GHC.IO中,差异和预期用途有何用途ioToSTunsafeSTToIO定义?

-- ---------------------------------------------------------------------------

-- Coercions between IO and ST

-- | A monad transformer embedding strict state transformers in the 'IO'
-- monad.  The 'RealWorld' parameter indicates that the internal state
-- used by the 'ST' computation is a special one supplied by the 'IO'
-- monad, and thus distinct from those used by invocations of 'runST'.
stToIO        :: ST RealWorld a -> IO a
stToIO (ST m) = IO m

ioToST        :: IO …
Run Code Online (Sandbox Code Playgroud)

io haskell ghc state-monad

11
推荐指数
2
解决办法
438
查看次数

标签 统计

ghc ×1

haskell ×1

io ×1

state-monad ×1