(\ ds_d9Aj ->
let! { (a_a851, b_a852) ~ _ <- ds_d9Aj } in
((a_a851, b_a852), ())))
or
(\ ds_d9Ai -> let! { (ds_d9Ag, _) ~ _ <- ds_d9Ai } in ds_d9Ag))
or
(\ ds_d9Ab ->
let! { (a_a851, b_a852) ~ _ <- ds_d9Ab } in
(((a_a851, b_a852), ()), ())))
The constant shuffling of the tuples in comparison to the point-free arrow style also seems to make it harder to optimize. This change [1] is stalled at the moment and I'm also not sure how much it would help. Would using named functions allow one to use RULES? On the other hand, how can we obtain a better result without the tuple overhead? Does proc notation require it and can we obtain a better translation of proc to a point-free style?
[1](
https://phabricator.haskell.org/D72)