Skip to content
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

Use StateT from F#+ #5

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Conversation

gusty
Copy link
Contributor

@gusty gusty commented Jan 31, 2020

I want to see the impact of using a StateT from F#+

If it makes sense we can eventually merge it but that's not the main motivation to me.

@gusty
Copy link
Contributor Author

gusty commented Feb 2, 2020

Note that:
<??> sprintf "uint16be: failed at %i"
is equivalent to
</catch/> (fun (ParseError (p, _) ) -> throw <| ParseError (p, Other (sprintf "readString failed at %i" p)))

which would be the "standard way", however it's too long. Maybe it's a consequence of the current ParserError design.

@smoothdeveloper
Copy link
Owner

@gusty, if using </catch/> in <??> implementation, what would it look like?

@gusty
Copy link
Contributor Author

gusty commented Feb 2, 2020

Good point !
It would look like this.

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