Haskell "man" Pages?

Are there man pages for every single function in Haskell? In other words, can I type man fstsomewhere and get a man or function help page? I find the abundance of features overwhelming!

I use GHC and GHCi.

+3
source share
2 answers

I don’t know the command line tool for this, but you can use Hoogle to find the type of function, a brief description of its documentation and a link to the complete online documentation based on its name.

-: , ! , , , , .

Hayoo, Hackage ( Hoogle ), , , : "fst" haskell98, base - .

GHCi , , ; ,

GHCi> :t fst
fst :: (a, b) -> a

, fst , , .

+9

Hoogle GHCi:

$ cabal install hoogle
$ echo >> ~/.ghci ':def doc \x -> return $ ":!hoogle --info \"" ++ x ++ "\""'

Download and build Hoogle databases:
$ hoogle data

GHCi:

ghci> :doc fst
Prelude fst :: (a, b) -> a

Extract the first component of a pair. 

From package base
fst :: (a, b) -> a
+2

All Articles