Haskell Documentation on Terminal

Viewed 4516

Is it possible to get Haskell Documentation from Terminal or from ghci?

In Ruby I usually do

ri thefunc

In Perl I usually do

perldoc -f thefunc

Or I can get interactive help in Python.

How to do this kind of thing in Haskell? For example, if I want to get Documentation about [] or : on Terminal?


Update

I found this related thread, but I'm not sure if :i is the answer :-/ or is it?

*Main> :i []
data [] a = [] | a : [a]    -- Defined in GHC.Types
instance (Eq a) => Eq [a] -- Defined in GHC.Base
instance Monad [] -- Defined in GHC.Base
instance Functor [] -- Defined in GHC.Base
instance (Ord a) => Ord [a] -- Defined in GHC.Base
instance (Read a) => Read [a] -- Defined in GHC.Read
instance (Show a) => Show [a] -- Defined in GHC.Show
4 Answers
Related