ekmett / machines

Networks of composable stream transducers
Other
339 stars 46 forks source link

effectful `takingJusts` #113

Closed marcosh closed 3 years ago

marcosh commented 3 years ago

I'm playing a bit with the library and I noticed that the current definition for takingJusts would work also with a ProcessT m (Maybe a) a type.

Is there a particular reason why the current API restrict it to Process?

Taneb commented 3 years ago

Process a b is simply forall m. Monad m => ProcessT m a b. This means that I can straight away use takingJusts as though it had the type (for example) ProcessT IO (Maybe Int) Int, without any work on my part. It's not in fact restricted at all.

marcosh commented 3 years ago

you're right! thanks for the quick response!