Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Expand scaladoc for fs2.Pure #2811

Merged
merged 1 commit into from
Feb 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion core/shared/src/main/scala/fs2/fs2.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ package object fs2 {

/** Indicates that a stream evaluates no effects.
*
* A `Stream[Pure,O]` can be safely converted to a `Stream[F,O]` for all `F`.
* Because [[Stream]] is covariant, A `Stream[Pure,O]` is also an instance of `Stream[F,O]` for all `F`.
*
* This should not be confused with [[cats.Id]], which provides an alternative encoding of pure streams,
* namely `Stream[Id, O]`. The difference is that `Stream[Id, O]` achieves purity by using an effect type
* whose evaluation is a no-op, whereas `Stream[Pure, O]` achieves purity by using an effect type that
* has no instances and therefore cannot be instantiated in the first place.
*/
type Pure[A] <: Nothing

Expand Down