Questions tagged «unsafe-perform-io»

1
unsafeDupablePerformIO和accursedUnutterablePerformIO有什么区别?
我在Haskell图书馆的限制区中徘徊,发现了这两个卑鄙的咒语: {- System.IO.Unsafe -} unsafeDupablePerformIO :: IO a -> a unsafeDupablePerformIO (IO m) = case runRW# m of (# _, a #) -> a {- Data.ByteString.Internal -} accursedUnutterablePerformIO :: IO a -> a accursedUnutterablePerformIO (IO m) = case m realWorld# of (# _, r #) -> r 但是,实际的区别似乎只是runRW#和之间($ realWorld#)。我对他们在做什么有一些基本的想法,但是我并没有真正理解使用它们之间的真正后果。有人可以告诉我有什么区别吗?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.