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

[Feature Request] Support for Result<T, E> for direct bifurcation #35

Open
Dessix opened this issue Jul 8, 2022 · 0 comments
Open

[Feature Request] Support for Result<T, E> for direct bifurcation #35

Dessix opened this issue Jul 8, 2022 · 0 comments

Comments

@Dessix
Copy link

Dessix commented Jul 8, 2022

Custom enums for every non-det state are somewhat limited in that they add a lot of boilerplate if someone wants to make a conversion to Result; with a lack of FromResidual and Try implementations for each non-det enum, they don't have the same expressiveness for monadic chaining.

I'd like to request either of a way to automatically derive Try and FromResidual implementations for non-det output types, or for Result<T, E> to just work if T and E are both states declared in this machine.

The current interpretation of Result<State, AnotherState> is treated by the validator and graph generation as being "final" states.

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

No branches or pull requests

1 participant