[Haskell-cafe] Statically tracking "validity" - suggestions?
andrewcoppin at btinternet.com
Tue Aug 31 14:23:37 EDT 2010
Luke Palmer wrote:
> I have a description of the design pattern you need, appropriately
> named: http://lukepalmer.wordpress.com/2009/03/24/certificate-design-pattern/
Mmm, I like that.
There are two small problems:
* In my web browser, some of the code snippets get the right-hand edge
* Double-precision floating-point arithmetic is inexact, so half your
code won't actually work in the real world. (But obviously, it's only
supposed to be an example for illustration purposes.)
With regard to the second, does anybody know of anything on Hackage for
testing whether two values are "approximately equal"? It must be a
common programming problem, and it's more tricky than you think to solve
More information about the Haskell-Cafe