<p>There are at least four things that can count as polymorphism in current Haskell:</p>

<ul>
<li>Parametric polymorphism. (Also <a href="https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#kind-polymorphism" rel="noreferrer">kind polymorphism</a>, polymorphism in the kinds instead of the types. Which I guess is parametric polymorphism one level above, so I'm not counting it as a separate entry.)</li>
<li>Ad-hoc polymorphism, the one enabled by typeclasses. Introduced in the <a href="https://www.cse.iitk.ac.in/users/karkare/courses/2010/cs653/Papers/ad-hoc-polymorphism.pdf" rel="noreferrer">How to make ad-hoc polymorphism less ad hoc</a> paper.</li>
<li><a href="https://www.andres-loeh.de/Koke2005.pdf" rel="noreferrer">Structural polymorphism</a>. This is the one enabled by <a href="http://hackage.haskell.org/package/base-4.12.0.0/docs/GHC-Generics.html" rel="noreferrer">generics</a>. A function can work over multiple data types that have different number of fields and constructors. For example, a generic equality function for records.</li>
<li><a href="https://www.youtube.com/watch?v=lSJwXZ7vWBw" rel="noreferrer">Levity polymorphism</a>. Polymorphism over calling conventions / runtime representations of types. Described in the <a href="https://cs.brynmawr.edu/~rae/papers/2017/levity/levity-extended.pdf" rel="noreferrer">Levity Polymorphism</a> paper.</li>
</ul>

<p>There are two more types of polymorphism that <em>might</em> be introduced in future versions of Haskell:</p>

<ul>
<li><p>Matchability polymorphism. Would allow higher-order type families to work with both type constructors and type families as arguments. Described in the paper <a href="https://www.microsoft.com/en-us/research/uploads/prod/2019/03/ho-haskell.pdf" rel="noreferrer">Higher-order Type-level Programming in Haskell</a>.</p></li>
<li><p>Multiplicity polymorphism. Would allow higher-order functions to work with both normal functions and linear functions as arguments. Described in the paper <a href="https://arxiv.org/pdf/1710.09756.pdf" rel="noreferrer">Linear Haskell Practical Linearity in a Higher-Order Polymorphic Language</a>.</p></li>
</ul>

<p>One might ask, why this whole panoply of polymorphisms? There seems to exist an overall design principle in Haskell that, whenever some challenge could be solved with either subtyping <em>or</em> polymorphism, <em>polymorphism should be preferred</em>.</p>

<p>For example, from the levity polymorphism paper:</p>

<blockquote>
  <p>We can now present the main idea of the paper: replace sub-kinding
  with kind polymorphism.</p>
</blockquote>

<p>From the paper introducing matchability polymorphism:</p>

<blockquote>
  <p>At first you might think that we need subtyping, but instead we turn to polymorphism</p>
</blockquote>

<p>From the linear Haskell paper:</p>

<blockquote>
  <p>The lack of subtyping is a deliberate choice in our design</p>
</blockquote>

<p>Simon Peyton Jones himself makes the point at <a href="https://www.youtube.com/watch?v=t0mhvd3-60Y&amp;feature=youtu.be&amp;t=2820" rel="noreferrer">47:00</a> in <a href="https://www.youtube.com/watch?v=t0mhvd3-60Y" rel="noreferrer">this talk</a>.</p>

<blockquote>
  <p>Whenever you want to use subtyping, use polymorphism instead.</p>
</blockquote>
Which polymorphism types are supported in Haskell?
<p>Reading the Wikipedia definition of <a href="https://en.wikipedia.org/wiki/Polymorphism_(computer_science)" rel="noreferrer">polymorphism</a>, I come with a question:</p>

<p>Which polymorphism types are supported in Haskell and which are not?</p>

<p>Looks like Wikipedia do not contain a description for some polymorphism types like <a href="https://www.microsoft.com/en-us/research/wp-content/uploads/2016/11/levity-1.pdf" rel="noreferrer">Levity Polymorphism</a> which is new for me and supported in Haskell.</p>

<p>I wondering to have an extended list of <a href="https://wiki.haskell.org/Polymorphism" rel="noreferrer">Haskell Polymorphism</a> followed with examples to explore deeply.</p>

<p>Looks like the main two are:</p>

<ul>
<li>Parametric polymorphism</li>
<li>Ad-hoc polymorphism</li>
</ul>