Changes between Version 7 and Version 8 of OverlappingInstances


Ignore:
Timestamp:
Apr 18, 2006 8:24:50 AM (8 years ago)
Author:
ross@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OverlappingInstances

    v7 v8  
    1414== Tickets == 
    1515[[TicketQuery(description~=OverlappingInstances)]] 
     16 
     17== Pros == 
     18 * useful on occasion. 
     19 
     20== Cons == 
     21 * Makes it very easy for incorrect programs to still typecheck. 
     22 * Can cause confusing error messages. 
     23 * A program that type checks can have its meaning changed by adding an instance declaration. 
     24 * Similarly adding "import M()" can silently change the meaning of a program (by changing which instances are visible. 
     25 * When exactly is overlap permitted?  Is this ok? 
     26   {{{      
     27instance C a Int 
     28instance C Bool b 
     29}}} 
     30 * The language description would need to be a lot more specific about exactly where context reduction takes place. 
     31 * Can sometimes be simulated with the extra-method trick used in the Show class of the Prelude for showing lists of characters differently than lists of other things. 
    1632 
    1733== Variations == 
     
    3248   ... 
    3349}}} 
    34  
    35 == Pros == 
    36  * useful on occasion. 
    37  
    38 == Cons == 
    39  * including a new module can silently change behavior of a program. 
    40  * makes it very easy for incorrect programs to still typecheck 
    41  * can cause confusing error messages 
    42  * can sometimes be simulated with the extra-method trick used in the Show class of the prelude for showing lists of characters differently than lists of other things.