Type signatures are not correctly checked against inferred types with negative type variables
The following Curry program is accepted by the frontend, but it should be rejected due to the dependency of h
from g
and g
from x
bound on the left-hand side in f
. Because of the dependencies the type of h
has to be the same as the one from f
.
f :: Eq a => a -> Bool
f x = g x
where
g y = x == y
h :: a -> Bool
h x = g x