artella
artella

Reputation: 5118

Haskell : display/get list of all user defined functions

Is there a command in Haskell which displays (or get as a list of) all the user defined functions which have been loaded/defined in the GHCi? Thanks

Upvotes: 17

Views: 2402

Answers (2)

Ben Millwood
Ben Millwood

Reputation: 6991

To see bindings you've made at the ghci prompt (e.g. with let or <-), try :show bindings.

If you've loaded some modules, you can use :show modules to get the names of loaded modules and then :browse ModuleName to list everything in scope from that module.

Upvotes: 23

Daniel Wagner
Daniel Wagner

Reputation: 152682

When in ghci, use :browse or just :bro after loading the file. You may also browse unloaded modules via :browse Foo.Bar.Baz.

Upvotes: 10

Related Questions