[Git][ghc/ghc][master] Add since pragmas to GHC.IO.Handle.FD
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Fri Jul 28 22:49:55 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
ee93edfd by Bodigrim at 2023-07-28T18:48:21-04:00
Add since pragmas to GHC.IO.Handle.FD
- - - - -
1 changed file:
- libraries/base/GHC/IO/Handle/FD.hs
Changes:
=====================================
libraries/base/GHC/IO/Handle/FD.hs
=====================================
@@ -13,6 +13,8 @@
--
-- Handle operations implemented by file descriptors (FDs)
--
+-- @since 4.2.0.0
+--
-----------------------------------------------------------------------------
module GHC.IO.Handle.FD (
@@ -157,6 +159,8 @@ openFile fp im =
-- raising an exception. If closing the handle raises an exception, then
-- this exception will be raised by 'withFile' rather than any exception
-- raised by @act at .
+--
+-- @since 4.16.0.0
withFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r
withFile fp im act =
catchException
@@ -189,6 +193,8 @@ openFileBlocking fp im =
-- by raising an exception. If closing the handle raises an exception, then
-- this exception will be raised by 'withFile' rather than any exception raised
-- by @act at .
+--
+-- @since 4.16.0.0
withFileBlocking :: FilePath -> IOMode -> (Handle -> IO r) -> IO r
withFileBlocking fp im act =
catchException
@@ -217,6 +223,8 @@ openBinaryFile fp m =
-- the file will be closed automatically. The action /should/
-- close the file when finished with it so the file does not remain
-- open until the garbage collector collects the handle.
+--
+-- @since 4.16.0.0
withBinaryFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r
withBinaryFile fp im act =
catchException
@@ -366,6 +374,8 @@ fdToHandle fdint = do
-- | Turn an existing Handle into a file descriptor. This function throws an
-- IOError if the Handle does not reference a file descriptor.
+--
+-- @since 4.10.0.0
handleToFd :: Handle -> IO FD.FD
handleToFd h = case h of
FileHandle _ mv -> do
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ee93edfded6ef95e911b7d265feebd1c7f542e8d
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ee93edfded6ef95e911b7d265feebd1c7f542e8d
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230728/93ba65cf/attachment-0001.html>
More information about the ghc-commits
mailing list