mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-16 16:29:32 -06:00
Replaced inlinePerformIO with accursedUnutterablePerformIO
This commit is contained in:
@@ -68,7 +68,7 @@ import qualified Data.ByteString.Lazy as L
|
||||
import Data.ByteString.Base (inlinePerformIO)
|
||||
import qualified Data.ByteString.Base as S
|
||||
#else
|
||||
import Data.ByteString.Internal (inlinePerformIO)
|
||||
import Data.ByteString.Internal (accursedUnutterablePerformIO)
|
||||
import qualified Data.ByteString.Internal as S
|
||||
--import qualified Data.ByteString.Lazy.Internal as L
|
||||
#endif
|
||||
@@ -199,7 +199,7 @@ defaultSize = 32 * k - overhead
|
||||
|
||||
-- | Sequence an IO operation on the buffer
|
||||
unsafeLiftIO :: (Buffer -> IO Buffer) -> Builder
|
||||
unsafeLiftIO f = Builder $ \ k buf -> inlinePerformIO $ do
|
||||
unsafeLiftIO f = Builder $ \ k buf -> accursedUnutterablePerformIO $ do
|
||||
buf' <- f buf
|
||||
return (k buf')
|
||||
{-# INLINE unsafeLiftIO #-}
|
||||
|
||||
@@ -423,7 +423,7 @@ readN n f = fmap f $ getBytes n
|
||||
getPtr :: Storable a => Int -> Get a
|
||||
getPtr n = do
|
||||
(fp,o,_) <- readN n B.toForeignPtr
|
||||
return . B.inlinePerformIO $ withForeignPtr fp $ \p -> peek (castPtr $ p `plusPtr` o)
|
||||
return . B.accursedUnutterablePerformIO $ withForeignPtr fp $ \p -> peek (castPtr $ p `plusPtr` o)
|
||||
{- INLINE getPtr -}
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user