#2819: Bad example code in documentation of Control.Exception.catch
-----------------------------+----------------------------------------------
Reporter:  mafo              |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  libraries/base  
 Version:  6.10.1            |       Severity:  trivial         
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 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))
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2819>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to