Closed nrinaudo closed 9 years ago
I'm terribly sorry, I appear to be using an out-of-date version (0.3.0) in which it was not yet implemented. Apologies, I should have looked at the most recent source.
No problem :) On Jun 16, 2015 6:41 PM, "Nicolas Rinaudo" notifications@github.com wrote:
I'm terribly sorry, I appear to be using an out-of-date version (0.3.0) in which it was not yet implemented. Apologies, I should have looked at the most recent source.
— Reply to this email directly or view it on GitHub https://github.com/lihaoyi/fastparse/issues/28#issuecomment-112365353.
As a side note, it's a bit confusing that the more recent version is 0.1.7
, but there's a 0.3.0
version available in Maven.
Granted, if one follows your (well written) instructions, there is no problem, but it confuses tools such as sbt-updates (and people like who follow such tools blindly).
I just encountered this version confusion before figuring out there really shouldn't be 0.3.0 out there.
There are some cases where we need to fail gracefully within a
map
call. As an example, I have some code that parses a charset name and needs to turn it into an instance ofjava.nio.charset.Charset
. The name itself might be valid syntactically but not actually be the name of a validCharset
, which I can only discover in themap
call.I think what I'm really asking for is for is for
map
to be able to return a failing parser - that is, forParser
to have aflatMap
method.