Non-H98 crusade, contd.

Ross Paterson ross at soi.city.ac.uk
Mon Feb 28 07:32:54 EST 2005


On Mon, Feb 28, 2005 at 11:25:26AM +0000, Keean Schupke wrote:
> Further I think functional dependancies (without overlapping instances), 
> and undecidable instances are perfectly well understood. (incoherent 
> instances would join overlapping instances and not be included).

Where can I read this understanding?  The GHC docs on FDs are terse,
referring to the original paper, but that paper is somewhat informal,
and describes a weaker system than what is implemented.  For example,
(taken from s7 of the paper), given

	class U a b | a -> b where u :: a -> b
	class U a b => V a b where v :: a -> b

the paper says that the principal type of \x -> (u x, v x) is

	(U a b, V a c) => a -> (b,c)

According to GHC and Hugs, it is

	V a b => a -> (b,b)

I think that's sensible, but where are the rules that give it?
I suspect that writing this addendum may take a while.


More information about the Libraries mailing list