-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This probably resolves #1150, though it doesn't provide an alternative type class as was brought up there. @adelbertc has [gotten tripped up](#1150 (comment)) by `pureEval` defaulting to a call to `pure` with `.value` called on the `Eval`. @johnynek has also [questioned](#1150 (comment)) `pureEval` being directly on `Applicative`. @tpolecat has [raised concerns](https://gitter.im/typelevel/cats?at=5794dc4c1b9de56c0edd887a) that `pureEval` looks like it might exist as a way to inject side effects into a type, but that it doesn't actually make any claims about execution semantics or value retention, so it can't be relied upon to do this. I think that there could be an argument for having an instantiation method for a side-effect-y type (like a `Task`) that takes an `Eval[A]` and produces an instance that will repeat the computation given `Always`, memoize the value given `Later`, etc. However, I don't think that @tpolecat necessarily agrees with me, and I think that even _if_ this is a reasonable thing to do, `Applicative` probably isn't the place for it. Since several people have questioned `pureEval`, it was entirely untested, and I haven't heard any one argue for it staying, I'm inclined to remove it. If someone has a compelling example of when a non-strict argument can be useful for `pure`, then I may be convinced. But even then we should clearly document what behavior can be expected of `pureEval`.
- Loading branch information
Showing
6 changed files
with
0 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters