tomjaguarpaw / product-profunctors

Other
19 stars 14 forks source link

Why is (***!) being considered for removal? #37

Closed endgame closed 7 years ago

endgame commented 7 years ago

This refers to the comments on the haddock for (***!):

You probably never want to use ***! and it may be deprecated in a future version.

I find it useful when building aggregators in opaleye, often writing things like aggregate (groupBy ***! max) $ proc () -> do .... Is there a better or more-recommended way to do that?

sjoerdvisscher commented 7 years ago

Yes, you can use the Applicative operators: aggregate ((,) <$> groupBy <*> max) $ proc () -> do ...

Sorry, scratch that, it would need to be aggregate ((,) <$> lmap fst groupBy <*> lmap snd max) $ proc () -> do ... which is quite long...

tomjaguarpaw commented 7 years ago

Hello @endgame. You can either do what @sjoerdvisscher suggested or use

p2 (groupBy, max)

Can I ask how you even found out about ***!? If it's in some documentation that I wrote then I should probably change it!

endgame commented 7 years ago

Can I ask how you even found out about ***!?

I think the stackage snapshot I was using pulled in the old version of product-profunctors and I picked it up from reading the class definition.

Now that I have a replacement, I have no objection to its removal.

(P.S. Thanks for the fast response.)