(.) :: (b -> c) -> (a -> b) -> (a -> c)
corresponds to the logical statement ∀A,B,C. (B → C) → ((A → B) → (A → C))
. (.) :: (b -> c) -> (a -> b) -> (a -> c)
corresponds to the logical statement ∀A,B,C. (B → C) → ((A → B) → (A → C))
. undefined = undefined
has the type a
, which corresponds to ∀A. A
, a logical statement which is obviously not true. The simplest way to resolve this problem is to ban unrestricted recursion, which typically entails a totality checker that only permits recursion in certain circumstances so as to guarantee that functions will always halt.