Ensure extension flags are flattened in the Cmm phase
authorIan Lynagh <igloo@earth.li>
Thu, 5 Aug 2010 13:36:14 +0000 (13:36 +0000)
committerIan Lynagh <igloo@earth.li>
Thu, 5 Aug 2010 13:36:14 +0000 (13:36 +0000)
If we start with a .cmmcpp file then they don't get flattened in
the CmmCpp phase, as we don't run that phase.

compiler/main/DriverPipeline.hs

index 2b9cd43..113348f 100644 (file)
@@ -914,7 +914,7 @@ runPhase CmmCpp _stop hsc_env _basename _suff input_fn get_output_fn maybe_loc
 
 runPhase Cmm stop hsc_env basename _ input_fn get_output_fn maybe_loc
   = do
-        let dflags = hsc_dflags hsc_env
+        let dflags = ensureFlattenedExtensionFlags $ hsc_dflags hsc_env
         let hsc_lang = hscMaybeAdjustTarget dflags stop HsSrcFile (hscTarget dflags)
         let next_phase = hscNextPhase dflags HsSrcFile hsc_lang
         output_fn <- liftIO $ get_output_fn dflags next_phase maybe_loc