basvandijk / scientific

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

Making `scientificP` public. #51

Closed shlok closed 7 years ago

shlok commented 7 years ago

In /src/Data/Scientific.hs, we find the parser scientificP :: ReadP Scientific.

To use this parser in my own program, I ended up manually copying the parser’s code out. It would have been nice if it had been directly available from Data.Scientific.

What do you think about exposing this parser to the public?

basvandijk commented 7 years ago

Hi @shlok, If you have a use for scientificP I wouldn't mind having it exposed.

Care to submit a PR?

shlok commented 7 years ago

Hi @basvandijk. Do you think it would be worthwhile if we (or I) added unit tests for the examples that we recently added to the documentation for the Read instance and scientificP? (Just to make sure that actual results will never deviate from these documented examples.)

basvandijk commented 7 years ago

Hey @shlok, note that we already have a few parser unit tests but there's no problem adding a few more. Go ahead.