Sittampalam, Ganesh wrote:
Martin Sulzmann wrote:
Mark P Jones wrote:
In fact, the two sets of dependencies that you have given here are
provably equivalent, so it would be decidedly odd to have a "type
improvement" system that distinguishes between them.
Based on the FD-CHR formulation, for the single-range FD case we
get [...] which is clearly weaker.
[...]
So, I conclude that in the Haskell type improvement context
there's clearly a difference among single-range and multi-range FDs.
This seems like a flaw in FD-CHR, rather than a fundamental difference
between the dependencies.
Of course, we could define multi-range FDs in terms of single-range FDs
which then trivially solves the "equivalence" problem (but some user
may be disappointed that their multi-range FDs yield weaker improvement).
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]
It's hard to say who's right or wrong but there's a design space which needs
to be explored further.
Martin
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe