-
Notifications
You must be signed in to change notification settings - Fork 120
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
discard is too lazy #363
Comments
You probably want to use EDIT: A simple example trying to discard everything with (It's not |
In my specific case, it's a complicated Gen where suchThat wouldnt be easily usable. Would it be possible to create a version of discard that works even in a lazy Gen monad? |
Not without changing the definition of
Depends on what you mean by "easily", i.e. below is IMO not too complicated (such definition were proposed in literature, not sure if anyone made a library for it though): You can work with >>> :t \mg -> suchThatMap (runMaybeT mg) id
\mg -> suchThatMap (runMaybeT mg) id :: MaybeT Gen b -> Gen b |
This is the intended behaviour of |
I expect using
discard
inGen
to discard the current case, but it doesn't discard unless I force it:The text was updated successfully, but these errors were encountered: