basvandijk / scientific

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

Publicly expose scientificP parser #52

Closed shlok closed 7 years ago

shlok commented 7 years ago

See https://github.com/basvandijk/scientific/issues/51.

basvandijk commented 7 years ago

Thanks! Could you also add some documentation?

It would also be good if we document the relationship between readPrec and scientificP so that users know skipping whitespace is not part of scientificP. As in:

    -- | Note that `readPrec` is defined as:
    -- @readPrec = Read.parens $ ReadPrec.lift $ ReadP.skipSpaces >> 'scientificP'@
    readPrec = Read.parens $ ReadPrec.lift $ ReadP.skipSpaces >> scientificP
shlok commented 7 years ago

Hi @basvandijk. I added some documentation for scientificP and the Read instance. Feel free to suggest improvements. (I haven’t yet added the readPrec documentation that you suggested.)

basvandijk commented 7 years ago

The documentation is excellent. Thanks! Released as scientific-0.3.5.0.

shlok commented 7 years ago

@basvandijk Nice! Thanks for your cooperation.