Skip to content

Parser builder map transform throws #119

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

Closed
wants to merge 4 commits into from
Closed

Parser builder map transform throws #119

wants to merge 4 commits into from

Conversation

randomeizer
Copy link
Contributor

@randomeizer randomeizer commented Feb 11, 2022

Not proposing this gets merged exactly, more to illuminate a possible pathway. Open to better suggestions.

@stephencelis stephencelis changed the base branch from main to parser-builder-throws-2 February 11, 2022 14:48
Comment on lines +38 to +39
public func parse(_ input: inout Upstream.Input) throws -> NewOutput {
try self.transform(self.upstream.parse(&input))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Losing rethrows is probably the main reason why we'd want a dedicated operator for a throwing map. Combine does the same thing with tryMap. We're definitely open to adding tryMap! Want to start a discussion about tryMap and other potential throwing operators?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've started one at #121.

@stephencelis stephencelis deleted the branch pointfreeco:parser-builder-throws-2 February 14, 2022 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants