| 43 | | both pattern bound and let type signature bound variables are in scope in the |
| 44 | | body of a function. only let type signature bound variables may shadow other |
| 45 | | variables and no variables are ever in scope in a let type signature, pattern |
| 46 | | bound variables do not shadow but rather refer to the same type. |
| 47 | | ExplicitQuantification is required for all expression type signatures but not |
| 48 | | let type signatures. |
| | 43 | Both let-bound and lambda-bound type variables are in scope in the |
| | 44 | body of a function, and can be used in expression signatures. However, |
| | 45 | just as a let-binding can shadow other values of the same name, let-bound type variables |
| | 46 | may shadow other type variables. Thus no type variables are ever already in scope in a let-bound signature. |
| | 47 | Lambda-bound type variables (e.g. in a pattern) do not shadow but rather refer to |
| | 48 | the same type. ExplicitQuantification is required for all expression type signatures |
| | 49 | but not let-bound signatures. |
| 50 | | This proposal tries to strike a balance between backwards compatability, |
| 51 | | avoiding accidental type errors, and simplicity. let type signatures always |
| 52 | | create a new scope, pattern bound ones are always in the same scope and |
| 53 | | it is clear from expression type signatures what is a scoped type var. |
| | 51 | This proposal tries to strike a balance between backwards compatibility, |
| | 52 | avoiding accidental type errors, and simplicity. Let-bound type signatures always |
| | 53 | create a new scope, lambda-bound ones are always in the same scope, and |
| | 54 | it is clear from expression type signatures which are the scoped type vars. |