[Haskell-cafe] pi

Yitzchak Gale gale at sefer.org
Wed Oct 10 04:17:25 EDT 2007

Dan Piponi wrote:
> The reusability of Num varies inversely with how many
> assumptions you make about it.

A default implementation of pi would only increase usability,
not decrease it.

If you need a specialized definition of pi in your instance,
you would provide it, just as you do now.

If pi makes no sense in your instance and you need it to be
an error, you would define pi = error "pi in your face",
just as you do now.

And in the most common case, you would do nothing, instead
of redifining pi in the obvious way, as you need to do now.


More information about the Haskell-Cafe mailing list