#4286: System.Process.readProcess: incorrect documentation of return value
---------------------------------+------------------------------------------
Reporter: refold | Owner:
Type: bug | Status: new
Priority: normal | Component: libraries/process
Version: 6.12.3 | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: Documentation bug
---------------------------------+------------------------------------------
[http://trac.haskell.org/haskell-platform/ticket/143 Originally reported
at Haskell Platform bug tracker]:
----
The System.Process docs here:
http://haskell.org/ghc/docs/6.12.2/html/libraries/process-1.0.1.2/System-
Process.html#v%3AreadProcess
describes the return value as:
> returns either the output string, or, in the case of non-zero exit
> status, an error code, and any output.
and the given example output is:
> Right "Thu Feb 7 10:03:39 PST 2008\n"
This suggests that the return value looks like:
IO (Either ? String)
But the return type is shown (in that same documentation, and in ghci
6.12.3) as IO String, and my own experimentation shows no "Right" being
returned in the case of a successful operation - instead I get only the
String containing the program output, not wrapped.
Perhaps this is historic.
----
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4286>
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