[Haskell-beginners] How to check the help page of a function?

Mike Meyer mwm at mired.org
Sun May 17 00:16:48 UTC 2015


On Sat, May 16, 2015 at 6:30 PM, Brandon Allbery <allbery.b at gmail.com>
wrote:

> On Sat, May 16, 2015 at 7:18 PM, Peng Yu <pengyu.ut at gmail.com> wrote:
>
>> Many other languages have help pages in the command (see help() in
>> python and R). Why haskell doesn't have such a feature?
>>
>
> Because Haskell doesn't predate the web? :p
>

So do Python. And S, for that matter.

I don't know about R, but it's a fundamentally harder problem in a Haskell
environment than in a Python one. Python forces you to keep the sources
around, which has the doc strings in them, and has places to put doc
strings in the data describing it's internal objects. So the "help"
function is just a tool for examining those. Python's package installation
is also more amenable to such, which gives us pydoc instead of hoogle.


> You can build local documentation and access it from ghci with some hooks
> (see https://wiki.haskell.org/Ghci#Package_and_documentation_lookup
> although it's a bit outdated),
>

Maybe https://wiki.haskell.org/Hoogle#GHCi_Integration would be less
outdated?



> but Haskell is not a dynamic language and ghci is not trying to be its
> primary developer interface. And you can't exactly hyperlink on a terminal.
>

In that case, you need a more powerful web browser. Or to (as the hoogle
command does) install local copies of the documentation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150516/4c673e7a/attachment-0001.html>


More information about the Beginners mailing list