basvandijk / scientific

Arbitrary-precision floating-point numbers represented using scientific notation
BSD 3-Clause "New" or "Revised" License
73 stars 40 forks source link

Surrounds negative numbers with parentheses when necessary #68

Closed watashi closed 4 years ago

watashi commented 5 years ago

This behavior is consistent with Show instances of integral types in base and allows the result of show to be parsed as Haskell code. The added test used to fail and now passes:

    show (Just (-1)):                   FAIL
      test/test.hs:116:
      expected: "Just (-1.0)"
       but got: "Just -1.0"
watashi commented 5 years ago

Can we release 0.3.7.0 to hackage with this fix?

ndmitchell commented 5 years ago

This code looks good to me. Any reason for not merging it? Ping @basvandijk

watashi commented 4 years ago

@basvandijk ping, can we have this merged and release a new version with this fix?