Changes between Version 1 and Version 2 of ExplicitTypeApplication
- Timestamp:
- 12/14/11 03:33:54 (18 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ExplicitTypeApplication
v1 v2 6 6 {{{ 7 7 case x of 8 (C @a y z) -> .... 9 }}} 10 On the right-hand side we would have the type variable `a` in scope. 11 12 Note how the use of the symbol `@` is (in this case) unproblematic, since we can 13 use the fact that constructors always start with an uppercase letter to distinguish 14 whether the `@` refers to an "as pattern" or to a type application: 15 {{{ 16 case x of 8 17 p@(C @a y z) -> .... 9 18 }}} 10 On the right-hand side we would have the type variable `a` in scope. Note how 11 the use of `@` is (in this case) unproblematic, since we can use the fact that 12 constructors always start with an uppercase letter to distinguish whether the 13 `@` refers to an "as pattern" or to a type application. This cannot be used 14 to pattern-match on specific types: the only thing that we can match on are 15 variables. 19 20 Also note that this would not allow you to to pattern-match on specific types: 21 the only thing that we can match on are type or kind variables. 16 22 17 23
