Is it time to start deprecating FunDeps?

Martin Sulzmann martin.sulzmann at gmail.com
Wed May 1 13:08:58 CEST 2013


Comments see below.

On Wed, May 1, 2013 at 11:13 AM, AntC <anthony_clayden at clear.net.nz> wrote:
>> Martin Sulzmann <martin.sulzmann at ...> writes:
>>
>> (1) There's a mechanical way to translate FD programs with
>> non-overlapping instances to TF (and of course vice versa).
>
> Martin, no! no! no! You have completely mis-understood.
>
> I do _not_ _not_ _not_ want to replace FD's with TF's.
>
> I want to replace FD's with Equality Constraints.

Ok, that's the bit I've missed, but then I argue that you can't fully
encode FDs.

Consider again the 'Sum' example.

In the FD world:

Sum x y z1, Sum x y z2  ==> z1 ~ z2

enforced by

Sum x y z | x y -> z

In my TF encoding, we find a similar derivation step

SumF1 x y ~ z1, SumF1 x y ~ z2 ==> z1 ~ z2

So, you're asking can we translate/express FDs using GHC intermediate language
with plain type equations only?

-Martin


> And that's exactly
> because I want to use overlapping.
>
> (You've also failed to understand that the Sum example is for doing Peano
> Arith. See the solution I've just posted.)
>
>
>
>
>
> _______________________________________________
> Haskell-prime mailing list
> Haskell-prime at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-prime



More information about the Haskell-prime mailing list