title: What is the difference between Either a and Either Int? What is Either a ? A polymorphic type constructor? What is its purpose?
body: <p><strong>Introduction</strong>:</p>
  
  <p>I understand the difference between <code>Maybe a</code> and <code>Maybe Int</code>, I also understand the difference between <code>Either a b</code> and <code>Either Int Int</code>. I also understand that <code>Either Int</code> is the same kind of animal as <code>Maybe</code>, they both take a type as an argument and produce a new type i.e. they are both type constructors that take a single type as parameter (either concrete like Int or not concrete like <code>a</code>) and produce either a concrete type or polymorphic type.</p>
  
  <p>Now what I don't understand is what kind of construct is <code>Either a</code> ? It is not like <code>Maybe</code> because it can never produce a concrete (read not polymorphic)  type if we feed a concrete type (like <code>Int</code>) to it. So in this case is it correct to call <code>Either a</code> a polymorphic type constructor and call <code>Maybe</code> a concrete type constructor ? ( This is just how I call them, what are their official name in the Haskell nomenclature?) </p>
  
  <p>Furthermore, I don't know what is the official categorization within the Haskell type system of type constructors like <code>Either a</code> because it cannot be in the same kind of category as <code>Maybe</code> because - as mentioned in the previous paragraph - no matter to what type we apply <code>Either a</code> the resulting type never will be a concrete type, i.e. it will always be a polymorhic type, for example, <code>Either a Int</code>.</p>
  
  <p>The reason why I am asking this is because <code>Either a</code> is a <code>Functor</code>. Which starts to get confusing. Nothing like anything I've seen before. I don't know how should I conceptually interpret the fact that <code>Either a</code> ( a polymorphic type constructor ) is an instance of <code>Functor</code>? Similarly, <code>(-&gt;) r</code> (which is also the same kind of animal as <code>Either a</code>) is a <code>Functor</code> too.</p>
  
  <p><strong>Questions:</strong></p>
  
  <p>What are <code>Either a</code> and <code>(-&gt;) r</code> ?</p>
  
  <p>What are they called officially? </p>
  
  <p>How do they conceptually fit into the type system of Haskell ? </p>
  
  <p>Where are these polymorphic type constructors described / discussed in more detail?</p>
  
  <p>What whould I read about so I get a better understanding of them? </p>
  
  <p>Should I read about kinds? Are kinds the secret way towards understanding such polymorphic type constructors as <code>Either a</code> and <code>(-&gt;) r</code>? </p>
  
  <p>Is <code>Either a Int</code> the same kind of animal as <code>[a]</code> ?</p>
  
  <p>Is the only purpose of <code>Either a Int</code> to declare polymorphic input and output types for functions, just like in the case of <code>[a]</code> in <code>fmap :: (a -&gt; b) -&gt; [a] -&gt; [b]</code>? </p>
  
  <p><strong>Most important question</strong>:</p>
  
  <p>How should I interpret the following code in the light of the above described thoughts?</p>
  
  <pre><code>instance Functor (Either a) where 
    fmap f (Right x) = Right (f x) 
    fmap f (Left x) = Left x
  
  class Functor f where 
    fmap :: (a -&gt; b) -&gt; f a -&gt; f b
  </code></pre>
  
  <p>So the resulting <code>fmap</code> function (whose type is <code>fmap :: (a -&gt; b) -&gt; Either c a -&gt; Either c b</code>)  will be polymorphic in <code>c</code> ?</p>
  
  <p>Is this the only effect of making <code>Either a</code> an instance of <code>Functor</code>? 
  So that the resulting <code>fmap</code> function will be polymorphic in <code>c</code> ?</p>
  
  <p><strong>As compared to</strong>, for example, making <code>Either Int</code> an instance of <code>Functor</code>? </p>
  
  <p>Then the resulting <code>fmap</code> would work only on <code>Either Int a</code> types but would not work generally/polymorphically on all <code>Either a b</code> types? </p>
  
  <p>If I understand correctly is this the only point and purpose of having polymorphic type constructors like <code>Either a</code> ? So that <code>fmap</code> works on all <code>Either a b</code> types? </p>
  
  <p>I am confused and I am not sure if I am interpreting <code>Either a</code> correctly. Could someone please comfirm that 1) either my interpretation is correct 2) if not then please enlighten me.</p>
  
  <p>Thanks for reading.</p>