flexible contexts and context reduction

Ganesh Sittampalam ganesh at earth.li
Wed Mar 26 17:36:36 EDT 2008


On Wed, 26 Mar 2008, Ross Paterson wrote:

> On Wed, Mar 26, 2008 at 08:52:43PM +0000, Ganesh Sittampalam wrote:
>> I'm a bit confused about why the following program doesn't compile (in
>> any of 6.6.1, 6.8.1 and 6.9.20080316). Shouldn't the Ord (a, b) context
>> be reduced?
>
> To use bar, you need (Ord a, Ord b).  You're assuming that Ord (a, b)
> implies that, but it's the other way round.

Oh yes, I see. Thanks.

Ganesh


More information about the Glasgow-haskell-users mailing list