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

bracketReleaseIsCalledOnCompletedError assumes generators never fail #441

Closed
johnynek opened this issue Dec 7, 2018 · 1 comment · Fixed by #442
Closed

bracketReleaseIsCalledOnCompletedError assumes generators never fail #441

johnynek opened this issue Dec 7, 2018 · 1 comment · Fixed by #442

Comments

@johnynek
Copy link

johnynek commented Dec 7, 2018

see:

def bracketReleaseIsCalledOnCompletedOrError[A, B](fa: F[A], b: B) = {

since bracketCase must return an F[B], if the A => F[B] returns a failed F[B] the result must be a failure. However, this law is requiring it be equivalent to a pure which we can't guarantee in general.

I had to weaken an effect test in order to get this law (and only this law) to pass.

@johnynek
Copy link
Author

johnynek commented Dec 7, 2018

@alexandru do you know why we shouldn't change it from br.as(()) to br.attempt *> promise.get? that seems like the semantics we want actually.

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 a pull request may close this issue.

1 participant