-
Simon Peyton Jones authored
Improve the error messages given when a definition isn't polymorphic enough. In paticular, for this program: let v = runST (newSTRef True) in runST (readSTRef v) we get the message Inferred type is less polymorphic than expected Quantified type variable `s' escapes It is reachable from the type variable(s) `a' which are free in the signature Signature type: forall s. ST s a Type to generalise: ST s (STRef s Bool) When checking an expression type signature In the first argument of `runST', namely `(newSTRef True)' In the right-hand side of a pattern binding: runST (newSTRef True)
8ddfc3c1