title: What does deriving do/mean in Haskell?
body: <p>The definition of deriving on stack overflow is:</p>
  
  <blockquote>
    <p>"In Haskell, a derived instance is an instance declaration that is
    generated automatically in conjunction with a data or newtype
    declaration. The body of a derived instance declaration is derived
    syntactically from the definition of the associated type."</p>
  </blockquote>
  
  <p>I don't really understand any of it to be honest.</p>
  
  <p>The code below is taken from: <a href="http://www.newthinktank.com/2015/08/learn-haskell-one-video/" rel="nofollow noreferrer">Link</a> </p>
  
  <pre><code>data BaseballPlayer = Pitcher 
                          | Catcher
                          | Infielder
                          | Outfielder
                          deriving Show
  
  barryBonds :: BaseballPlayer -&gt; Bool
  barryBonds Outfielder = True
  
  barryInOf = print(barryBonds Outfielder)
  </code></pre>
  
  <p><strong>My question is, what does the deriving-statement do in this specific case, 
  and also what does the deriving-statement do in general?.</strong></p>