- export_set keep_alive rules_for_locals (fromOL all_prs)
-
- final_pgm = simplifyBinds $ combineEvBinds ds_ev_binds final_prs
- -- Notice that we put the whole lot in a big Rec, even the foreign binds
- -- When compiling PrelFloat, which defines data Float = F# Float#
- -- we want F# to be in scope in the foreign marshalling code!
- -- You might think it doesn't matter, but the simplifier brings all top-level
- -- things into the in-scope set before simplifying; so we get no unfolding for F#!
-
- -- Lint result if necessary, and print
- ; dumpIfSet_dyn dflags Opt_D_dump_ds "Desugared, before opt" $
- (vcat [ pprCoreBindings final_pgm
- , pprRules rules_for_imps ])
+ export_set keep_alive rules_for_locals (fromOL all_prs)
+
+ final_pgm = let comb = combineEvBinds ds_ev_binds final_prs
+ in if dopt Opt_F_simpleopt_before_flatten dflags
+ then comb
+ else simplifyBinds comb
+ -- Notice that we put the whole lot in a big Rec, even the foreign binds
+ -- When compiling PrelFloat, which defines data Float = F# Float#
+ -- we want F# to be in scope in the foreign marshalling code!
+ -- You might think it doesn't matter, but the simplifier brings all top-level
+ -- things into the in-scope set before simplifying; so we get no unfolding for F#!