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

Missing case for Constraint for fmap and <*> #62

Open
expipiplus1 opened this issue May 12, 2023 · 3 comments
Open

Missing case for Constraint for fmap and <*> #62

expipiplus1 opened this issue May 12, 2023 · 3 comments

Comments

@expipiplus1
Copy link

No description provided.

@expipiplus1
Copy link
Author

Ahh! This is actually annoying for passing in monadic/user state to the productions because if we put the constraining function inside a Prod (as is done for Many and Alts) then we can't discover the nulls without the user state, and hence can't use user state for avoiding rerunning the grammar!

@ollef
Copy link
Owner

ollef commented May 14, 2023

Oof. Can you see a way to implement it? Might have to be removed.

@expipiplus1
Copy link
Author

As it is, the constraint production can't remain at the same type, because without a Prod which is positive in the eventual Constraint type we have nowhere to push <*> into.

The constraint function however wouldn't need to change as it could easily forward to Constraint myProd (Pure myPredicate)

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

2 participants