<p dir="ltr">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 </p>
<div class="gmail_extra"><br><div class="gmail_quote">On Sep 12, 2016 2:03 PM, "David Feuer" <<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">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.</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Sep 12, 2016 1:53 PM, "David Feuer" <<a href="mailto:david.feuer@gmail.com" target="_blank">david.feuer@gmail.com</a>> wrote:<br type="attribution"><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I noticed the other day that</p>
<p dir="ltr">readMaybe (fix ('a':)) :: Maybe Double</p>
<p dir="ltr">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?</p>
</blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/libraries</a><br>
<br></blockquote></div></div>