[Haskell-cafe] Parsing floating point numbers

Daniel Peebles pumpkingod at gmail.com
Sun Mar 8 22:05:53 EDT 2009

If you're working with ByteStrings,
might help.


On Sun, Mar 8, 2009 at 8:34 PM, Bjorn Buckwalter
<bjorn.buckwalter at gmail.com> wrote:
> Hi all,
> What is your preferred method of parsing floating point numbers (from
> String to Float/Double)? Parsec it seems only does positive floats out
> of the box and PolyParse requires the float to be on scientific form
> (exponential). While I've worked around these shortcomings in the past
> I feel that I am reinventing the wheel as surely I am not the only to
> run into these limitations. How do you parse your floats? Can you
> recommend a parsing library that handles them solidly?
> (For my current needs the formats accepted by "read" are sufficient,
> but I want reasonable error handling (Maybe or Either) instead of an
> exception on bad inputs.)
> Thanks,
> Bjorn Buckwalter
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list