import Linker ( HValue, linkExpr )
import CoreTidy ( tidyExpr )
import CorePrep ( corePrepExpr )
-import Flattening ( flattenExpr )
import Desugar ( deSugarExpr )
import SimplCore ( simplifyExpr )
import TcRnDriver ( tcRnStmt, tcRnExpr, tcRnType )
<- {-# SCC "MkFinalIface" #-}
mkIface hsc_env maybe_old_iface details simpl_result
-- Emit external core
- emitExternalCore (hsc_dflags hsc_env) (availsToNameSet (mg_exports simpl_result)) cg_guts -- Move this? --Lemmih 03/07/2006
+ -- This should definitely be here and not after CorePrep,
+ -- because CorePrep produces unqualified constructor wrapper declarations,
+ -- so its output isn't valid External Core (without some preprocessing).
+ emitExternalCore (hsc_dflags hsc_env) cg_guts
dumpIfaceStats hsc_env
-------------------
= do { let { dflags = hsc_dflags hsc_env ;
lint_on = dopt Opt_DoCoreLinting dflags }
- -- Flatten it
- ; flat_expr <- flattenExpr hsc_env ds_expr
-
-- Simplify it
- ; simpl_expr <- simplifyExpr dflags flat_expr
+ ; simpl_expr <- simplifyExpr dflags ds_expr
-- Tidy it (temporary, until coreSat does cloning)
; let tidy_expr = tidyExpr emptyTidyEnv simpl_expr