Changes between Version 2 and Version 3 of OverlappingInstances


Ignore:
Timestamp:
Dec 5, 2005 4:11:36 AM (10 years ago)
Author:
john@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OverlappingInstances

    v2 v3  
    66== Brief Explanation ==
    77
     8overlapping instances allow instances that can unify for the same class and will choose the most specific one available
     9
     10An alternate to what GHC implements would be to declare whether a class may be overlapping on a class by class basis. perhaps with something like
     11{{{
     12class overlapping Foo a where
     13   ...
     14}}}
     15
    816== References ==
    917 * [http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html#instance-overlap Section on overlapping instances] in the GHC User's Guide.
    1018
     19
    1120== Pros ==
    12  * Pro
    13  * Pro
     21 * useful on occasion.
     22
    1423
    1524== Cons ==
    16  * Con
    17  * Con
     25 * including a new module can silently change behavior of a program.
     26 * makes it very easy for incorrect programs to still typecheck
     27 * can cause confusing error messages
     28 * 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.