Changes between Version 7 and Version 8 of ScopedTypeVariables


Ignore:
Timestamp:
Dec 6, 2005 10:52:19 AM (10 years ago)
Author:
malcolm.wallace@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ScopedTypeVariables

    v7 v8  
    4141== Proposal 1 ==
    4242
    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.
     43Both let-bound and lambda-bound type variables are in scope in the
     44body of a function, and can be used in expression signatures.  However,
     45just as a let-binding can shadow other values of the same name, let-bound type variables
     46may shadow other type variables. Thus no type variables are ever already in scope in a let-bound signature.
     47Lambda-bound type variables (e.g. in a pattern) do not shadow but rather refer to
     48the same type.  ExplicitQuantification is required for all expression type signatures
     49but not let-bound signatures.
    4950
    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.
     51This proposal tries to strike a balance between backwards compatibility,
     52avoiding accidental type errors, and simplicity. Let-bound type signatures always
     53create a new scope, lambda-bound ones are always in the same scope, and
     54it is clear from expression type signatures which are the scoped type vars.
    5455
    55 (perhaps this text can be cleaned up? what are better terms for let type signature, pattern bound type, and expression type signature?)
     56(perhaps this text can be cleaned up further? what is a better term for expression type signature?)
     57