regression: GHCi command output can no longer be redirected on a by-command basis
For writing advanced GHCi scripts, it is very helpful to be able to redirect the output of individual GHCi commands, for further processing by user-defined GHCi commands.
This no longer works in GHCi 6.12.3 (probably has stopped working earlier) on Windows. Surprisingly, the issue is not consistent - for instance, :type can still be redirected, :info cannot.
------------- example session output, using attached 'redir.script'
$ ghcii.sh -ignore-dot-ghci
GHCi, version 6.12.3: http://www.haskell.org/ghc/ :? for help
..
Prelude> :cmd readFile "redir.script"
Prelude> :redir x :t map
..
Prelude> x
"-- logging GHCi stdout\nmap :: (a -> b) -> [a] -> [b]\n"
Prelude> :redir y :i map
Prelude> y
"-- logging GHCi stdout\n*** Exception: WriteConsole: invalid argument (Das Handle ist ung\252ltig.)\n"
------ (that error message states that the handle is not valid)
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.12.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |