let source = Wonka.never
21 │ |> Wonka.onStart((. ) => print_endline("start"))
22 │ |> Wonka.share;
This expression's type contains type variables that can't be generalized:
Wonka_types.sourceT('_weak1)
This happens when the type system senses there's a mutation/side-effect,
in combination with a polymorphic value.
Using or annotating that value usually solves it.
FAILED: cannot make progress due to previous errors.
>>>> Finish compiling(exit: 1)
How would you annotate this function to get it to work? Thank you!
This has no type that can be used to fill out the missing type of the source, hence it'll need to be recast or used in a way that gives the stream a type
Running the docs example, I get:
Output
How would you annotate this function to get it to work? Thank you!