title: Haskell Documentation on Terminal
body: <p><strong>Is it possible to get Haskell Documentation from Terminal or from ghci?</strong></p>
  
  <p>In Ruby I usually do</p>
  
  <pre><code>ri thefunc
  </code></pre>
  
  <p>In Perl I usually do</p>
  
  <pre><code>perldoc -f thefunc
  </code></pre>
  
  <p>Or I can get interactive <code>help</code> in Python.</p>
  
  <p>How to do this kind of thing in Haskell? For example, if I want to get Documentation about <code>[]</code> or <code>:</code> on Terminal?</p>
  
  <hr>
  
  <h2>Update</h2>
  
  <p>I found <a href="https://stackoverflow.com/questions/3698994/how-does-haskell-deal-with-documentation">this related thread</a>, but I'm not sure if <code>:i</code> is the answer :-/ or is it?</p>
  
  <pre><code>*Main&gt; :i []
  data [] a = [] | a : [a]    -- Defined in GHC.Types
  instance (Eq a) =&gt; Eq [a] -- Defined in GHC.Base
  instance Monad [] -- Defined in GHC.Base
  instance Functor [] -- Defined in GHC.Base
  instance (Ord a) =&gt; Ord [a] -- Defined in GHC.Base
  instance (Read a) =&gt; Read [a] -- Defined in GHC.Read
  instance (Show a) =&gt; Show [a] -- Defined in GHC.Show
  </code></pre>