If I end up with an e.g. Stream[Id, A]
, I can translate
the effect Pure
with the trivial Id ~> Pure
.
However, if I've ended up with a stream of a different strict effect type, e.g. Stream[Option, A]
, how can I convert this to a Option[Vector[A]]
(or something)? The best way I've found so far is to translate the stream into some other type that does have a Sync
instance, run the stream, but then it's not straightforward to convert it back as Sync
admits all Throwable
s as failures whereas Option
naturally allows only None
. What's the better way of approaching this?