How can I view the definition of a function in Haskell/GHCi?

前端 未结 3 1710
清酒与你
清酒与你 2021-02-01 00:57

I\'m using Haskell 2010.1.0.0.1 with GHC 6. Typing :t at the GHCi prompt followed by the name of a function shows us the type of the function. Is there a way to vie

3条回答
  •  花落未央
    2021-02-01 01:17

    Nope, can't do that. Some fun things you, the Haskell beginner, can do:

    • On the HTML haddock documents, click on "source"... study the source.
    • :browse to find all of the definitions exported by a module
    • Use :help for the obvious result
    • use the web interface of hoogle to search for functions, or install hoogle locally!
    • ?
    • Profit!

提交回复
热议问题