summaryrefslogtreecommitdiff
path: root/compiler/main/HscMain.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/main/HscMain.hs')
-rw-r--r--compiler/main/HscMain.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs
index d94fc7842f..2c2df87b7c 100644
--- a/compiler/main/HscMain.hs
+++ b/compiler/main/HscMain.hs
@@ -637,6 +637,7 @@ hscCompileOneShot hsc_env extCore_filename mod_summary src_changed
compile mb_old_hash reason = runHsc hsc_env' $ do
liftIO $ msg reason
tc_result <- genericHscFrontend mod_summary
+ guts0 <- hscDesugar' (ms_location mod_summary) tc_result
dflags <- getDynFlags
case hscTarget dflags of
HscNothing -> return HscNotGeneratingCode
@@ -647,8 +648,7 @@ hscCompileOneShot hsc_env extCore_filename mod_summary src_changed
liftIO $ hscWriteIface dflags iface changed mod_summary
return HscUpdateBoot
_ ->
- do guts0 <- hscDesugar' (ms_location mod_summary) tc_result
- guts <- hscSimplify' guts0
+ do guts <- hscSimplify' guts0
(iface, changed, _details, cgguts) <- hscNormalIface' extCore_filename guts mb_old_hash
liftIO $ hscWriteIface dflags iface changed mod_summary
return $ HscRecomp cgguts mod_summary