-
Notifications
You must be signed in to change notification settings - Fork 187
Open
Labels
Description
The these package provides an unzip for these types, but it's a "two pass" fmap-based implementation that can leak memory. I suggested a solution using traverseBia from bifunctors, but that was rejected as too hard to understand. @phadej recommended adding the unzipper to containers instead. We can do this fairly simply, and certainly more efficiently than traverseBia can (at least until ekmett/bifunctors#93 eventually reaches Hackage).
I'll try to implement these next weekend; if someone else gives it a shot, they should be mindful of the fairly subtle NOINLINE tricks that tend to be required to ensure we get the selector thunks we want.