Bad example code in documentation of Control.Exception.catch
There is a bug in the documentation of Control.Exception.catch
http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Exception.html#4
If one uses System.IO.openFile then the example code shown in the documentation does not typecheck.
The example code is:
catch (openFile f ReadMode)
(\e -> hPutStr stderr ("Couldn't open "++f++": " ++ show e))
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries/base |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |