[Haskell-beginners] How to check the help page of a function?
Peng Yu
pengyu.ut at gmail.com
Sun May 17 12:54:36 UTC 2015
> 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>
--
Regards,
Peng
More information about the Beginners
mailing list