Numeric read seems too strict
Carter Schonwald
carter.schonwald at gmail.com
Wed Sep 14 18:14:20 UTC 2016
Read and show are supposed to be simple and perhaps at least have well
behaved asymptotic performance , but ultimately are for simple debugging
and or pasting back into source. Granted it winds up also being used to
serialize small config that are human manipulable or easy to paste back
into source
On Sep 12, 2016 2:03 PM, "David Feuer" <david.feuer at gmail.com> wrote:
> By the way, I believe we should be able to read numbers more efficiently
> by parsing them directly instead of lexing first. We have to deal with
> parentheses, white space, and signs uniformly for all number types. Then
> specialized foldl'-style code *should* be able to parse integral and
> fractional numbers faster than any lex-first scheme.
>
> On Sep 12, 2016 1:53 PM, "David Feuer" <david.feuer at gmail.com> wrote:
>
> I noticed the other day that
>
> readMaybe (fix ('a':)) :: Maybe Double
>
> is an infinite loop. The problem is that the lexer doesn't know that it's
> expected to lex a number. It just keeps scanning and scanning to get to the
> end of the endless token. Shall we fix this?
>
>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20160914/e4c366e1/attachment.html>
More information about the Libraries
mailing list