File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/Control/Distributed/Process Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -30,12 +30,10 @@ import Control.Exception (throw)
30
30
import GHC.Fingerprint.Type (Fingerprint (.. ))
31
31
import Data.ByteString (ByteString )
32
32
import qualified Data.ByteString as BS
33
- import qualified Data.ByteString.Internal as BSI ( unsafeCreate
34
- , inlinePerformIO
35
- , toForeignPtr
36
- )
33
+ import qualified Data.ByteString.Internal as BSI ( unsafeCreate , toForeignPtr )
37
34
import Foreign.Storable (pokeByteOff , peekByteOff , sizeOf )
38
35
import Foreign.ForeignPtr (withForeignPtr )
36
+ import System.IO.Unsafe (unsafePerformIO )
39
37
40
38
-- | Reification of 'Serializable' (see "Control.Distributed.Process.Closure")
41
39
data SerializableDict a where
@@ -63,7 +61,7 @@ decodeFingerprint :: ByteString -> Fingerprint
63
61
decodeFingerprint bs
64
62
| BS. length bs /= sizeOfFingerprint =
65
63
throw $ userError " decodeFingerprint: Invalid length"
66
- | otherwise = BSI. inlinePerformIO $ do
64
+ | otherwise = unsafePerformIO $ do
67
65
let (fp, offset, _) = BSI. toForeignPtr bs
68
66
withForeignPtr fp $ \ p -> peekByteOff p offset
69
67
You can’t perform that action at this time.
0 commit comments