[Git][ghc/ghc][master] Improve documentation around IOException and ioe_filename

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Sun Jul 30 21:22:30 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
42aa7fbd by Julian Ospald at 2023-07-30T17:22:01-04:00
Improve documentation around IOException and ioe_filename

See:

* https://github.com/haskell/core-libraries-committee/issues/189
* https://github.com/haskell/unix/pull/279
* https://github.com/haskell/unix/pull/289

- - - - -


1 changed file:

- libraries/base/GHC/IO/Exception.hs


Changes:

=====================================
libraries/base/GHC/IO/Exception.hs
=====================================
@@ -329,13 +329,16 @@ type IOError = IOException
 -- flagged.
 data IOException
  = IOError {
-     ioe_handle   :: Maybe Handle,   -- the handle used by the action flagging
-                                     -- the error.
-     ioe_type     :: IOErrorType,    -- what it was.
-     ioe_location :: String,         -- location.
-     ioe_description :: String,      -- error type specific information.
-     ioe_errno    :: Maybe CInt,     -- errno leading to this error, if any.
-     ioe_filename :: Maybe FilePath  -- filename the error is related to.
+     ioe_handle   :: Maybe Handle,   -- ^ the handle used by the action flagging
+                                     --   the error.
+     ioe_type     :: IOErrorType,    -- ^ what it was.
+     ioe_location :: String,         -- ^ location.
+     ioe_description :: String,      -- ^ error type specific information.
+     ioe_errno    :: Maybe CInt,     -- ^ errno leading to this error, if any.
+     ioe_filename :: Maybe FilePath  -- ^ filename the error is related to
+                                     --   (some libraries may assume different encodings
+                                     --   when constructing this field from e.g. 'ByteString'
+                                     --   or other types)
    }
 
 -- | @since 4.1.0.0



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/42aa7fbd6cc51f7cd993621336e1c3fa8202ab1f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/42aa7fbd6cc51f7cd993621336e1c3fa8202ab1f
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/20230730/eb568807/attachment-0001.html>


More information about the ghc-commits mailing list