[Haskell-cafe] attoparsec double precision, quickCheck and aeson

Warren Harris warrensomebody at gmail.com
Tue Jun 5 18:51:44 CEST 2012


On Jun 5, 2012, at 9:38 AM, Johan Tibell wrote:
> You want to perform your test as
> 
>    d1 - d2 < epsilon

What's the best way to do this though, since aeson's Value type already provides instance Eq? I guess I can write my own suite of equality comparisons, but these aeson values are the leaves of an extensive grammar and it seems a shame to mimic everything that Eq does (without the benefits of deriving) just to compare doubles differently. 


More information about the Haskell-Cafe mailing list