PUBLIC
Hi,
I’m seeing ‘do’ blocks getting taking apart into top-level definitions, so e.g.
main = do
some complicated expression 1
some complicated expression 2
is compiled into
sat_sKv = some complicated expression 1
sat_sKw = \_ -> some complicated expression 2
main = bindIO sat_sKv sat_sKw
This seems to happen regardless of any common subexpressions, i.e. it is not the case that sat_sKv or sat_sKw are used anywhere else.
What is the intended benefit of this floating-out? Is there a particular Core-to-Core pass that causes this? Is it possible to turn it off?
Thanks,
Gergo