Changes between Version 9 and Version 10 of ScopedTypeVariables


Ignore:
Timestamp:
Jan 7, 2006 3:32:10 PM (8 years ago)
Author:
ross@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ScopedTypeVariables

    v9 v10  
    4141        cmp x y = compare (f x) (f y) 
    4242}}} 
    43 In the latter two cases, the variable can stand for any type, not necessarily a type variable is in these examples, i.e. the variable is existentially quantified. 
     43In the latter two cases, the variable can stand for any type, not necessarily a type variable as in these examples, i.e. the variable is existentially quantified. 
    4444Hugs supports only pattern type signatures, with the type variables universally quantified. 
    4545 
     
    6969  is allowed. 
    7070 
    71   * A rule like ExplicitQuantification would most likely be needed if these were put into the standard. 
     71  * With pattern and result signatures, one must examine outer bindings to determine whether an occurrence of a type variable is a binding. 
     72    This creates a potential trap. 
     73    A rule like ExplicitQuantification might be needed if these were put into the standard. 
    7274  
    7375== Proposal 1 == 
     
    8890(perhaps this text can be cleaned up further? what is a better term for expression type signature?) 
    8991 
     92== Proposal 2 == 
     93 
     94Restrict the above extensions to: 
     95 * for function bindings, optional explicit `forall`s in type signatures. 
     96 * for pattern bindings, result type signatures. 
     97   Explicit universal quantification might be made mandatory. 
     98plus binding of type variables in instance heads.