Changes between Version 11 and Version 12 of Rank2Types
 Timestamp:
 Feb 17, 2007 11:23:54 PM (10 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Rank2Types
v11 v12 10 10 g :: (forall a. a > a) > (Bool, Char) 11 11 }}} 12 2. In the definition of the function, polymorphic arguments must be matched on the lefthand side, and can only be matched by a variable or wildcard (`_`) pattern. The variable then has the polymorphic type of the corresponding argument, e.g. 13 {{{ 12 2. In the definition of the function, polymorphic arguments 13 1. must be matched on the lefthand side, and 14 1. can only be matched by a variable or wildcard (`_`) pattern. The variable then has the polymorphic type of the corresponding argument, e.g. 15 {{{ 14 16 g f = (f True, f 'a') 15 17 }}} 16 3. When such a function is used, it must be applied to at least as many arguments to include the polymorphic ones (so it's a good idea to put those first). Each expression must have a generalized type at least as general as that declared for the corresponding argument, e.g.18 4. When such a function is used, it must be applied to at least as many arguments to include the polymorphic ones (so it's a good idea to put those first). Each expression must have a generalized type at least as general as that declared for the corresponding argument, e.g. 17 19 {{{ 18 20 g id 19 21 g undefined 20 22 }}} 21 The more general [wiki:RankNTypes] re move the last restriction in many cases.23 The more general [wiki:RankNTypes] relax restrictions 2(1) and 3. 22 24 23 25 == References ==