let x = pi in x + x doesn't reuse work in the shared computation of pi. It reduces to pi + pi, which is
proc () -> do
x1 <- pi -< ()
x2 <- pi -< ()
(+) -< (x1, x2)
whereas we would prefer
proc () -> do
x <- pi -< ()
(+) -< (x, x)
I'm not sure how we can do that.
let x = pi in x + xdoesn't reuse work in the shared computation ofpi. It reduces topi + pi, which iswhereas we would prefer
I'm not sure how we can do that.