I made a mistake in another question that could have been solved by viewing
:t myfunctionofinterest
for a function I was using in a librar
Quoting the GHCi docs:
The
:module
command provides a way to do two things that cannot be done with ordinary import declarations:
:module
supports the*
modifier on modules, which opens the full top-level scope of a module, rather than just its exports.
The additional *
makes GHCi load the bytecode version of the module. This will not be as performant, but you'll get access to unexported bindings.
Example:
λ> :m *MyLib
λ> :t myfunctionofinterest
If you get
module 'MyLib' is not interpreted; try ':add *MyLib' first
you may have to do :load
first (the advice about :add
doesn't always do the trick):
λ> :l *MyLib
λ> :m *MyLib
λ> :t myfunctionofinterest