
17 May
2015
17 May
'15
1 p.m.
On Sun, May 17, 2015 at 7:54 AM, Peng Yu
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.