Changes between Version 8 and Version 9 of Defaulting


Ignore:
Timestamp:
Jan 16, 2007 5:06:05 PM (7 years ago)
Author:
malcolm.wallace@…
Comment:

note Simon Marlow's counter example

Legend:

Unmodified
Added
Removed
Modified
  • Defaulting

    v8 v9  
    114114 
    115115=== Backwards compatibility === 
    116 The current Haskell'98 default-default behaviour can be specified as: 
     116The current Haskell'98 default-default behaviour can (nearly) be specified as: 
    117117{{{ 
    118118default Num Integer 
     
    125125default RealFloat Double 
    126126}}} 
     127 
     128However, 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. 
    127129 
    128130=== Turning off defaults ===