The type of van Laarhoven lenses forall f. Functor f => (i -> f i) -> o -> f o
seems to be made for effectful updates i -> f i
. At least so I believed. And I had to pay dearly because of that.
Read the full story in my blogpost at: How to shoot yourself in the foot with lenses and state | shoot-yourself-in-the-foot-with-lenses
(Apologies for using github as minimalist platform for blog posts…)