RE: Class instance specificity order (was Re: Fundeps and type equality)

2013-01-11 Thread Simon Peyton-Jones
| 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 |

Re: Class instance specificity order (was Re: Fundeps and type equality)

2013-01-11 Thread Tyson Whitehead
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

Class instance specificity order (was Re: Fundeps and type equality)

2013-01-10 Thread Tyson Whitehead
On January 10, 2013 13:56:02 Richard Eisenberg wrote: Class instances that overlap are chosen among by order of specificity; Sorry to jump in the middle here, but this caught my attention as this sort of specificity determination is exactly what I had in mind when I was working on my The shape

RE: Class instance specificity order (was Re: Fundeps and type equality)

2013-01-10 Thread Simon Peyton-Jones
-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

RE: Class instance specificity order (was Re: Fundeps and type equality)

2013-01-10 Thread Tyson Whitehead
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