[GHC] #14730: Missing predicate for "ResourceVanished" IOException/IOErrorType

GHC ghc-devs at haskell.org
Wed Feb 6 06:23:31 UTC 2019


#14730: Missing predicate for "ResourceVanished" IOException/IOErrorType
-------------------------------------+-------------------------------------
        Reporter:  bit               |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  libraries/base    |              Version:  8.2.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by vdukhovni):

 Example Errno.hsc usages:
 {{{
 $ ghci Errno.hs
 GHCi, version 8.6.3: http://www.haskell.org/ghc/  :? for help
 [1 of 1] Compiling System.IO.Errno  ( Errno.hs, interpreted )
 Ok, one module loaded.
 *System.IO.Errno> show EPERM
 "Operation not permitted"
 *System.IO.Errno> show $ IOErrno 0
 "No error: 0"
 *System.IO.Errno> show $ IOErrno 1000
 "Unknown error: 1000"
 *System.IO.Errno> strerror $ IOErrno 0
 Just "No error: 0"
 *System.IO.Errno> strerror $ IOErrno 1000
 Nothing
 *System.IO.Errno> fromEnum EPERM
 1
 *System.IO.Errno> toEnum 5 :: IOErrno
 Input/output error
 *System.IO.Errno> case toEnum 1 of { EPERM -> True; _ -> False }
 True
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14730#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list