Gabriella439 / pipes

Compositional pipelines
BSD 3-Clause "New" or "Revised" License
487 stars 72 forks source link

Add several new instances for ListT #149

Closed jwiegley closed 7 years ago

jwiegley commented 9 years ago

This PR adds a few instances that I think make sense for ListT, and increases the dependency list by two. If any of these instances are not desired, let me know and I'll rework the patch.

jwiegley commented 9 years ago

I see, MonadThrow and MonadCatch for Proxy are in pipes-safe. Should those instances for ListT be moved there as well?

Gabriella439 commented 9 years ago

Sorry for the delayed response (I was on vacation).

I'm okay with adding exceptions-related instances to pipes now. exceptions is a pretty light-weight dependency. I would like to hold off on Semigroup, though, because it's a really heavyweight dependency.

Also, I'm actually not sure what is the best policy for INLINE/INLINABLE annotations on instance methods. The last time I checked this a long time ago and I think my conclusion was that adding no annotation at all gave the best behavior, but there is a very high chance that my memory is wrong. Is there a simple benchmark we could add for one of these to test which annotation gives the best performance?