optimiseBody :: Body Kernels -> UnstreamM (Body Kernels)
optimiseBody (Body () stms res) =
  localScope (scopeOf stms) $
  Body () <$> (concat <$> mapM optimiseStm stms) <*> pure res
optimiseBody :: Body Kernels -> UnstreamM (Body Kernels)
optimiseBody (Body () stms res) =
  localScope (scopeOf stms) $
  Body () <$> (concat <$> mapM optimiseStm stms) <*> pure res
optimiseBody (Body () stms res) =
  localScope (scopeOf stms) $
  Body () <$> (concat <$> mapM optimiseStm stms) <*> pure res