| The -XOverlappingInstances flag instructs GHC to allow more than one
| instance to match, provided there is a most specific one. For example,
| the constraint C Int [Int] matches instances (A), (C) and (D), but the
| last is more specific, and hence is chosen. If there is no most-specific
|
On January 11, 2013 13:55:58 Simon Peyton-Jones wrote:
| The -XOverlappingInstances flag instructs GHC to allow more than one
| instance to match, provided there is a most specific one. For example,
| the constraint C Int [Int] matches instances (A), (C) and (D), but the
| last is more
-haskell-users@haskell.org
| Cc: Richard Eisenberg; Martin Sulzmann; Simon Peyton-Jones
| Subject: Class instance specificity order (was Re: Fundeps and type equality)
|
| On January 10, 2013 13:56:02 Richard Eisenberg wrote:
| Class instances that overlap are chosen among by order of specificity
On Thu, 2013-01-10 at 22:17 +, Simon Peyton-Jones wrote:
Is
http://www.haskell.org/ghc/docs/latest/html/users_guide/type-class-extensions.html#instance-overlap
insufficiently clear? If so, let's clarify it.
Thanks for getting back to me Simon. The document says
For example, consider