Implemented a matching algorithm for types which is necessary for implementing the polymorphic subordination.