Changes between Version 7 and Version 8 of ExplicitTypeApplication
 Timestamp:
 Dec 15, 2011 10:22:05 AM (5 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

ExplicitTypeApplication
v7 v8 28 28 }}} 29 29 30 The idea is to provide moreaccess to the explicit types in the core language30 The idea is to provide access to the explicit types in the core language 31 31 (system [http://dreixel.net/research/pdf/ghp.pdf FCpro]) 32 32 directly from the source language syntax. … … 34 34 35 35 == How many arguments, and their order == 36 When we have multiple variables , we can use as many as we need, and also use37 underscores:36 When we have multiple variables we can pattern match on as many as we need, 37 and also use underscores: 38 38 {{{ 39 39 f (C @_ @b x ) = ... … … 64 64 }}} 65 65 In this case it is really ambiguous what the pattern means. For these 66 cases we havethe following workaround:66 cases we suggest the following workaround: 67 67 {{{ 68 68 f :: Int > forall a. a … … 73 73 74 74 === Syntax for promoted datatypes === 75 It also introduces the need to disambiguate between a datatype and its promoted 76 kind. Consider the example: 75 With `XPolyKinds` on, we can also match/apply kind arguments. This introduces the 76 need to disambiguate between a datatype and the promoted kind it introduces. 77 Consider the example: 77 78 {{{ 78 79 data X = X … … 84 85 or a type (since we use @ both for kind and type application), we need to be 85 86 able to disambiguate between datatypes and their corresponding promoted kinds. 87 At the moment this ambiguity does not arise, so we do not allow prefixing 88 kinds with `'`, but it seems natural to lift this restriction, and use the 89 same notation as for promoted data constructors. 86 90 87 91 == More examples ==