Skip to content

:types <module> (or :browse! <module>) - browse plain types, not in context, for IDEs

currently, :browse <module> pretty prints types in context, which is good for users but bad for tools building on ghci: types of class methods or data constructors are difficult to reconstruct from that output.

could ghci please support a slight variation of :browse, with a plain listing of 'name :: type' for all names, including class methods and data constructors? since the code will be nearly identical to browseModule, the command could be ':browse! [*]<module>' (with :b defaulting to :browse), or perhaps ':types [*]<module>' (with :t defaulting to :type, not :types).

my haskell mode plugins for vim use the :browse output to avoid separate calls to ghci every time a type is needed, but give incomplete types for class methods and no types for data constructors, so this is a small change (6.8.1?-) that would help all my users (and possibly other ghci-based tools, as well).

Trac metadata
Trac field Value
Version 6.6.1
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC claus.reinke@talk21.com
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information