-> PersistentCompilerState -> HomeSymbolTable
-> Module -> PrintUnqualified
-> TcResults
- -> IO ([CoreBind], [(Id,CoreRule)], SDoc, SDoc, [CoreBndr])
+ -> IO ([CoreBind], [(Id,CoreRule)], (SDoc, SDoc, [CoreBndr]))
deSugar dflags pcs hst mod_name unqual
(TcResults {tc_env = local_type_env,
-- Do desugaring
; let (result, ds_warns) = initDs dflags us lookup mod_name
(dsProgram mod_name all_binds rules fo_decls)
- (ds_binds, ds_rules, _, _, _) = result
+ (ds_binds, ds_rules, _) = result
-- Display any warnings
; doIfSet (not (isEmptyBag ds_warns))
(printErrs unqual (pprBagOfWarnings ds_warns))
-- Lint result if necessary
- ; let do_dump_ds = dopt Opt_D_dump_ds dflags
- ; endPass dflags "Desugar" do_dump_ds ds_binds
+ ; endPass dflags "Desugar" Opt_D_dump_ds ds_binds
-- Dump output
- ; doIfSet do_dump_ds (printDump (ppr_ds_rules ds_rules))
+ ; doIfSet (dopt Opt_D_dump_ds dflags)
+ (printDump (ppr_ds_rules ds_rules))
; return result
}
local_binders = mkVarSet (bindersOfBinds ds_binds)
in
mapDs (dsRule local_binders) rules `thenDs` \ rules' ->
- returnDs (ds_binds, rules', h_code, c_code, fe_binders)
+ returnDs (ds_binds, rules', (h_code, c_code, fe_binders))
where
auto_scc | opt_SccProfilingOn = TopLevel
| otherwise = NoSccs