Changes between Version 9 and Version 10 of ScopedTypeVariables
- Timestamp:
- 01/07/06 07:32:10 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ScopedTypeVariables
v9 v10 41 41 cmp x y = compare (f x) (f y) 42 42 }}} 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.43 In 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. 44 44 Hugs supports only pattern type signatures, with the type variables universally quantified. 45 45 … … 69 69 is allowed. 70 70 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. 72 74 73 75 == Proposal 1 == … … 88 90 (perhaps this text can be cleaned up further? what is a better term for expression type signature?) 89 91 92 == Proposal 2 == 93 94 Restrict 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. 98 plus binding of type variables in instance heads.
