i had been hoping for some more feedback regarding my attempt to address parts of ticket #1617 (unrestricted variant of :browse), as well as emails regarding capturing the output of GHCi commands as Haskell Strings.
http://www.haskell.org/pipermail/glasgow-haskell-bugs/2007-August/009735.html
http://www.haskell.org/pipermail/glasgow-haskell-users/2007-August/013040.html
http://hackage.haskell.org/trac/ghc/ticket/1617

but that was before the branch, and i'd like to get at
least an initial version of this functionality into 6.8.

so i've implemented (draft patches wrt current head attached):

- :browse! a variant of :browse, that does not filter out children, and does not display children in context of their parents
       (as described; this still suffers from the issue that i have not
       found a function to display the stored type of class methods
       correctly; it also does not yet account for qualified names,
       when their unqualified versions are available, nor does it
       address the issue of not updating properly on :reload, both
       issues are described in ticket #1617)

[btw, how did the debugger manage to steal :b from :browse? i think this should be changed back to the traditional (pre 6.7) behaviour, but have not done so yet]
   - GHCi command output capture (again, as described)
       for   :help, :browse, :info, :set, :show (showModules,
showBindings,showBkptTable,showContext).
       mostly this has been about refactoring hardcoded i/o
       into separate i/o and rendering, so that the rendered
       output can be captured in a variable ('output'). the
       capturing itself is isolated in a single function ('out'),
       so changing the variable name would be easy.

there are probably other commands one would want to capture later. there is a new renderForUser (for use with out, making it easier to replace the all too popular printForUser).
the patches seem to affect the output of tests (fast stage=2)
only in two cases, break006 and print003, both of which
use :show bindings (which is obviously aware of the new
'output' variable), so i suggest to accept the new output for
these two tests.

i would still like to know how one is supposed to display
the type of class methods, and why 'it' is not bound in the same naive way i've used to bind 'output'. once these two
issues are addressed, i still need to add a couple of tests,
as well as some documentation..

could you please have a look into this?
claus

Attachment: ghci-browse-and-output-capture.diff
Description: Binary data

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to