> Although maybeRead was proposed, I cannot find it:
here's a replacement...
http://hackage.haskell.org/packages/archive/safe/0.2/doc/html/Safe.html#v%3AreadMay
Greetings,
Daniel
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskel
Bjorn Buckwalter wrote:
> 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).
Thanks for the bug report. Polyparse i
On Sun, 8 Mar 2009, Felipe Lessa wrote:
On Sun, Mar 8, 2009 at 9:34 PM, Bjorn Buckwalter
wrote:
(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.)
Why not
readM :: (Monad m, Rea
If you're working with ByteStrings,
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bytestring-lexing
might help.
Cheers,
Dan
On Sun, Mar 8, 2009 at 8:34 PM, Bjorn Buckwalter
wrote:
> Hi all,
>
> What is your preferred method of parsing floating point numbers (from
> String to Float/D
On Sun, Mar 8, 2009 at 9:34 PM, Bjorn Buckwalter
wrote:
> (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.)
Why not
readM :: (Monad m, Read a) => String -> m a
readM str = case [
On Sun, 2009-03-08 at 19:34 -0500, Bjorn Buckwalter 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
> (exponent
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 th