New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FlatMap does not properly implement Parser #1731
Comments
I'm not sure, but it seems to me that backporting such fixes would break semantic versioning. I myself just upgraded from 7.1.3 to 8.0.0-alpha2 because I really needed the more flexible typing of 8 for everything flatmap related. (Related to on-the-fly parsing of function declarations w/r arguments for a lambda-calculus dialect.) 7.1.3 IMO has a broken flat_map implementation: the return type should be a Parser, and not an FnMut, especially in a context where it is so hard to give explicit names for anonymous closure types in rust. I'd rather push for a 8.0.0 release or pre-release available on crates.io rather than a backport. Because of semver. |
Oh ! 8.0.0-alpha2 is usable !! Great ! |
Example test case:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=38ea81309c5b6c70c5ded853cbb30a34
nom/src/internal.rs
Line 262 in 869f897
nom/src/internal.rs
Line 364 in 869f897
Seems like a mismatch between above lines (notice Fn vs FnMut), making the
flat_map
unusable.However I saw it fixed in current main branch
nom/src/internal.rs
Line 673 in e87c7da
Will this fix also be ported to 7.x?
The text was updated successfully, but these errors were encountered: