>
> | Also, you say a dependency with zero variables on the right side is
> | syntactically correct, but later you say it will be reported as an
> | error because it says nothing. Why bother?
>
> Point taken. In fact that same database text I mentioned above
> prohibits functional dependencies in which either side is empty.
> But it turns out that the two extremes ("a ->" and "-> a") are
> rather interesting so I didn't want to exclude either as being
> syntactically well-formed. Rejecting the former at a later stage
> was a design decision, intended only to catch errors, and isn't
> an essential part of the design.
>
> All the best,
> Mark
Should redundant dependencies trigger an error or a warning? I'd say that if
I'm writing some haskell code, I wouldn't mind if a redundancy is flagged as
an error; most likely, it'd take a short time to fix. However, if someone is
generating haskell automatically (maybe with Derive, PolyP, a GUI designer,
...), the easiest thing to do is to generate all the dependencies that will
make the types correct, without trying to avoid redundancies. In this case,
I think a warning is better.
Just my 2 cents.
Fermin