A principal type is a most general valid type scheme: every other valid typing of the expression is obtained by substituting types for its quantified type variables, subject to any declared class constraints. For example, \s x f y -> f (s y x) has type (u -> v -> w) -> v -> (w -> r) -> u -> r; the application constraints require precisely these connections and no equality between the four type variables. A concrete typing is an instance, not evidence that the expression needs that particular type.

Articles by others on the same topic (1)

The term "principal type" is often used in the context of programming languages and type systems, particularly in the study of type inference and polymorphism. Here’s a breakdown of what it usually refers to: 1. **Principal Type**: In type theory and programming languages, the principal type of an expression is the most general type that can be assigned to that expression. It captures all possible types that the expression can take without losing any information about its behavior.