Haskell : display/get list of all user defined functions

独自空忆成欢 提交于 2019-11-29 17:14:14

问题


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


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/10272094/haskell-display-get-list-of-all-user-defined-functions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!