[Haskell-cafe] Functional dependencies and Peano numbers

Oscar Finnsson oscar.finnsson at gmail.com
Tue Jul 6 15:37:12 EDT 2010


Hi,

there is a lot of buzz around functional dependencies on the mailing
list and Planet Haskell. I've read some of the tutorials and I think I
understand how they work but I still haven't figured out where they
can be useful.

* Can someone give me a real world (preferably hackagedb) example
where functional dependencies are used?

* Can someone give me a real world (preferably hackagedb) example
where Peano numbers a la "data Zero; data Succ n" are used?

Finally...

* All the examples involving functional dependencies are on the form

> a b c | a b -> c

but can they also be on a form similar to

> a b c d e f g h| b c -> d e f | b d g -> h

 (i.e. d,e,f are decided by the b,c-combination while h is decided by
the b,d,g-combination)?

-- Oscar


More information about the Haskell-Cafe mailing list