diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-04-18 02:02:28 +0000 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-04-18 02:02:28 +0000 |
commit | 3c0f3eaff28795b5ba497ca3c8f660ea50ff4be3 (patch) | |
tree | eea57100ea0c7761b1ce4064e220a529c5ddb72c | |
parent | 9710994c7c833b3ffd5c6f1e060cdf40510ba050 (diff) | |
download | haskell-3c0f3eaff28795b5ba497ca3c8f660ea50ff4be3.tar.gz |
XXX: Eta expand
This shouldn't be necessary
-rw-r--r-- | libraries/base/GHC/ForeignPtr.hs | 2 | ||||
-rw-r--r-- | libraries/base/GHC/IO/Unsafe.hs | 2 | ||||
-rw-r--r-- | libraries/base/GHC/ST.hs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/libraries/base/GHC/ForeignPtr.hs b/libraries/base/GHC/ForeignPtr.hs index 1148e58922..a1b8f20c82 100644 --- a/libraries/base/GHC/ForeignPtr.hs +++ b/libraries/base/GHC/ForeignPtr.hs @@ -412,7 +412,7 @@ withForeignPtr :: ForeignPtr a -> (Ptr a -> IO b) -> IO b -- 'Storable' class. withForeignPtr fo@(ForeignPtr _ r) f = IO $ \s -> case f (unsafeForeignPtrToPtr fo) of - IO action# -> keepAlive# r action# s + IO action# -> keepAlive# r (\s -> action# s) s touchForeignPtr :: ForeignPtr a -> IO () diff --git a/libraries/base/GHC/IO/Unsafe.hs b/libraries/base/GHC/IO/Unsafe.hs index 6e0ebc4ecf..9478f3794e 100644 --- a/libraries/base/GHC/IO/Unsafe.hs +++ b/libraries/base/GHC/IO/Unsafe.hs @@ -102,7 +102,7 @@ like 'Control.Exception.bracket' cannot be used safely within @since 4.4.0.0 -} unsafeDupablePerformIO :: IO a -> a -unsafeDupablePerformIO (IO m) = case runRW# m of (# _, a #) -> a +unsafeDupablePerformIO (IO m) = case runRW# (\s -> m s) of (# _, a #) -> a {-| 'unsafeInterleaveIO' allows an 'IO' computation to be deferred lazily. diff --git a/libraries/base/GHC/ST.hs b/libraries/base/GHC/ST.hs index 98ba18b3d8..5d4c3e754c 100644 --- a/libraries/base/GHC/ST.hs +++ b/libraries/base/GHC/ST.hs @@ -135,5 +135,5 @@ instance Show (ST s a) where -- The @forall@ ensures that the internal state used by the 'ST' -- computation is inaccessible to the rest of the program. runST :: (forall s. ST s a) -> a -runST (ST st_rep) = case runRW# st_rep of (# _, a #) -> a +runST (ST st_rep) = case runRW# (\s -> st_rep s) of (# _, a #) -> a -- See Note [Definition of runRW#] in GHC.Magic |