Type checking and recursive types (Writing the Y combinator in Haskell/Ocaml)
- by beta
When explaining the Y combinator in the context of Haskell, it's usually noted that the straight-forward implementation won't type-check in Haskell because of its recursive type.
For example, from Rosettacode [1]:
The obvious definition of the Y combinator in Haskell canot be used
because it contains an infinite recursive type (a = a -> b).…