[Haskell-beginners] How to check the help page of a function?
Mike Meyer
mwm at mired.org
Sun May 17 13:00:51 UTC 2015
On Sun, May 17, 2015 at 7:54 AM, Peng Yu <pengyu.ut at gmail.com> wrote:
> > GHCi has such a command:
> > :doc <function name>
> >
> > For example:
> > Prelude> :doc head
> > Prelude head :: [a] -> a
> >
> > Extract the first element of a list, which must be non-empty.
> >
> > From package base
> > head :: [a] -> a
>
> Where is it? I don't see it.
>
> GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help
> Prelude> :doc head
> unknown command ':doc'
> use :? for help.
> Prelude>
>
I suspect the author's environment defines the doc command, as it's not
built in. Links to two different ways (one that opened pages in a web
browser, and the other that invoked the hoogle command) to do that have
already been posted to the thread.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150517/eb4ad557/attachment.html>
More information about the Beginners
mailing list