title: Does interface belong to ad hoc polymorphism (i.e. overloading) or subtype polymorphism?
body: <p><a href="https://wiki.haskell.org/Polymorphism" rel="nofollow noreferrer">https://wiki.haskell.org/Polymorphism</a> says</p>
  <blockquote>
  <p><strong>Ad-hoc polymorphism</strong> refers to when a value is able to adopt any one of several types because it, or a value it uses, has been given a separate definition for each of those types. For example, the + operator essentially does something entirely different when applied to floating-point values as compared to when applied to integers – in Python it can even be applied to strings as well. Most languages support at least some ad-hoc polymorphism, but in languages like C it is restricted to only built-in functions and types. Other languages like C++ allow programmers to provide their own <strong>overloading</strong>, supplying multiple definitions of a single function, to be disambiguated by the types of the arguments. In Haskell, this is achieved via the system of <strong>type classes</strong> and class instances.</p>
  <p>Despite the similarity of the name, Haskell's <strong>type classes</strong> are quite
  different from the classes of most object-oriented languages. They
  have more in common with <strong>interfaces</strong>, in that they specify a series of
  methods or values by their type signature, to be implemented by an
  instance declaration.</p>
  </blockquote>
  <p>Does it mean that type classes is a way to achieve overloading i.e. ad hoc polymorphism?</p>
  <p>What kind of polymorphism does interface in OO languages (e.g. Java, C#) belong to, ad hoc polymorphism (i.e. overloading) or subtype polymorphism?</p>
  <ul>
  <li><p>Since type class is similar to interface, is interface a way to achieve overloading i.e. ad hoc polymorphism, just as type class is?</p>
  </li>
  <li><p>Is interface   similar to base class, so is interface a way to achieve subtype polymorphism, just as class inheritance is?</p>
  </li>
  </ul>
  <p>Thanks.</p>