Haskell : display/get list of all user defined fun

2019-02-08 10:07发布

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

2条回答
可以哭但决不认输i
2楼-- · 2019-02-08 10:43

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.

查看更多
倾城 Initia
3楼-- · 2019-02-08 10:46

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

查看更多
登录 后发表回答