[Haskell-cafe] looking for examples of non-full Functional Dependencies

Sittampalam, Ganesh ganesh.sittampalam at credit-suisse.com
Thu Apr 17 08:20:44 EDT 2008


> > Why not instead transform single-range FDs into multi-range ones where 
> > possible?

> That's a perfectly reasonable assumption and would establish the logical property that

> a -> b /\ a -> c   iff a -> b /\ c

> for FDs (by definition).

> But what about programmers who'd like that

> C [x] y z   yields the improvement y = [b], z =[b]

> where

> class C a b c | a -> b c
> instance C a b b => C [a] [b] [b]

Isn't that precisely what you earlier said would happen with multi-range FDs?
Either I'm missing some difference or we're talking at cross-purposes.

My suggestion is that

"class C a b c | a -> b c" and "class C a b c | a -> b, a -> c" be both
treated as the former case, leading to both cases having the y=[b],z=[b]
improvement as above.

Cheers,

Ganesh

==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================



More information about the Haskell-Cafe mailing list