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

Iavor Diatchki iavor.diatchki at gmail.com
Wed Apr 16 13:29:59 EDT 2008


On Wed, Apr 16, 2008 at 8:06 AM, Martin Sulzmann
<martin.sulzmann at gmail.com> wrote:
> We're also looking for (practical) examples of "multi-range" functional
> dependencies
>  class C a b c | c -> a b
>  Notice that there are multiple (two) parameters in the range of the FD.
>  It's tempting to convert the above to
>  class C a b c | c -> a, c -> b
>  but this yields a weaker (in terms of type improvement) system.

Could you elaborate on this?  I think that a system that distinguishes
these two would be very confusing.   If you think of the FDs as
logical statements about what is known of type variables, then the FDs
on the two classes correspond to equivalent logical statements, so I
am not sure why would we distinguish them for improvement purposes.
Also, it seems fairly easy to convert between the two forms purely
based on syntax, so if the one somehow results in better improvements,
why would we ever use the other one?

As for examples of interesting uses of functional dependencies,
perhaps the literature on relational databases would provide some?


More information about the Haskell-Cafe mailing list