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

A Stream can pull anything. #1757

Closed

Commits on Jan 22, 2020

  1. A Stream can Pull anything: change Stream to FreeC[F, O, IAny]

    A `Stream[F, O]` is defined as a wrap on a `FreeC[F, O, Unit]`.
    The Unit type indicates, in types, that the "Result" type of the FreeC
    computation that would yield the stream is of no consequence:
    a Stream is a complete FreeC on its own, and its result is of no matter.
    
    We can also express that idea, in types, by marking that return type
    as an `Any`, the top type, which is another way to indicate that no
    useful information can come off the Result of the inner FreeC.
    One benefit is that we do not need spurious conversions on the FreeC
    object just to convert it back-and-forth a Stream: Any thing will do.
    
    To avoid problems with the Any poly-kindness, and much like with the
    INothing alias, we use a special IAny alias of Any for the types.
    diesalbla committed Jan 22, 2020
    Configuration menu
    Copy the full SHA
    3972d1f View commit details
    Browse the repository at this point in the history