FDs and confluence

Ross Paterson ross at soi.city.ac.uk
Mon Apr 10 11:01:52 EDT 2006

On Mon, Apr 10, 2006 at 02:39:18PM +0100, Claus Reinke wrote:
> >instance B a b => C [a] b Bool
> >
> >Starting from a constraint set C [a] b Bool, C [a] c d,
> there is no implication that d=Bool
> (you could add: 'instance B a b => C [a] b Char' without violating
> FD consistency).

These instances (alpha-renamed):

instance B a1 b1 => C [a1] b1 Bool
instance B a2 b2 => C [a2] b2 Char

violate the consistency condition: a substitution that unifies a1 and
a2 need not unify b1 and b2, because the consistency condition makes
no mention of the contexts.  (If it did, the instance improvement rule
would be invalid.)

More information about the Haskell-prime mailing list