Changes between Version 8 and Version 9 of Defaulting
- Timestamp:
- 01/16/07 09:06:05 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Defaulting
v8 v9 114 114 115 115 === Backwards compatibility === 116 The current Haskell'98 default-default behaviour can be specified as:116 The current Haskell'98 default-default behaviour can (nearly) be specified as: 117 117 {{{ 118 118 default Num Integer … … 125 125 default RealFloat Double 126 126 }}} 127 128 However, there are some incompatible cases where the new rule would cause a valid H'98 program to be rejected. For instance the expression {{{toRational pi}}} has the constraints {{{Floating}}} on pi and {{{Real}}} on toRational: in H'98, the type Double is the first type that satisfies both constraints, but with the proposed new rule no type would satisfy the constraints, so the expression would be rejected. To fix, you would need to annotate {{{pi}}} with a type. 127 129 128 130 === Turning off defaults ===
