[Haskell-beginners] Type classes and synonyms
sterl
s.clover at gmail.com
Sun Nov 22 13:08:24 EST 2009
Brent Yorgey wrote:
> "free theorem" will be of the form
>
> "Any function f of type T, *no matter how f is implemented*, will
> always satisfy the following property:
>
> blah blah f blah = blah f blah
> "
>
> This has nothing to do with whether or not there is only one possible
> implementation of f that does not involve undefined, which is a
> different phenomenon.
>
If it hasn't been mentioned, djinn turns type signatures into code, as
has been discussed, although if f has multiple implementations, it will
simply produce one of them.
http://hackage.haskell.org/package/djinn
The discussion on ltu helps flesh out the concept:
http://lambda-the-ultimate.org/node/1178
This is, of course, as Brent pointed out, very different from free theorems.
--S
More information about the Beginners
mailing list