:info enhancements
:info
is a very useful ghci command, but there are several improvements that could be made:
- It would be useful if
:i
showed not only which module a name is defined in, but which module(s) it was imported from in the current session. - A variant of
:i
that just prints a definition, rather than a definition and all instances, would be useful in many cases. E.g.:i Show
prints the definition ofShow
, but then it prints so many instances that the definition is scrolled way off the screen. -
:i ->
is a parse error; it should behave like:i (->)
, the way it works for other type-level operators. - hvr had some more suggestions: "finding out which package a module belongs to", "and what module an 'as'-alias is associated with". (Currently I think modules are out of
:info
's scope, but perhaps it would be a useful addition.)