As it was reported in #20 and #21, the test suite fails in GHCJS. The reason is that the test suite uses Float, but GHCJS emulates them with Double, because underlying JavaScript does not have any single-precision numbers. This leads to mismatches, because
The first one replaces all Float in the test suite with Double, making it portable between GHC and GHCJS. Now we can clearly see that Paradise test fails with 110000 /= 110000.00000000001.
The second commit fixes the test, demonstrating that this was the only issue.
Since comparing non-exactly representable doubles for equality is asking for trouble, the third commit replaces coefficient 0.1 by 0.125 and amends expected test outcome accordingly.
As it was reported in #20 and #21, the test suite fails in GHCJS. The reason is that the test suite uses
Float
, but GHCJS emulates them withDouble
, because underlying JavaScript does not have any single-precision numbers. This leads to mismatches, becauseThere are three commits:
Float
in the test suite withDouble
, making it portable between GHC and GHCJS. Now we can clearly see thatParadise
test fails with110000 /= 110000.00000000001
.0.1
by0.125
and amends expected test outcome accordingly.