hscInteractive hsc_env cgguts mod_summary = do
    let dflags = hsc_dflags hsc_env
        CgGuts{ -- This is the last use of the ModGuts in a compilation.
                -- From now on, we just use the bits we need.
               cg_module   = this_mod,
               cg_binds    = core_binds,
               cg_tycons   = tycons,
               cg_foreign  = foreign_stubs } = cgguts

        location = ms_location mod_summary
        data_tycons = filter isDataTyCon tycons
        -- cg_tycons includes newtypes, for the benefit of External Core,
        -- but we don't generate any code for newtypes

    -------------------
    -- PREPARE FOR CODE GENERATION
    -- Do saturation and convert to A-normal form
    prepd_binds <- {-# SCC "CorePrep" #-}
                   corePrepPgm hsc_env this_mod location core_binds data_tycons

    (stg_binds, _cost_centre_info)
        <- {-# SCC "CoreToStg" #-}
            myCoreToStg dflags this_mod prepd_binds

    let modClass = moduleJavaClass this_mod
    modClasses <- codeGen hsc_env this_mod location data_tycons stg_binds
                    (panic "hpc_info") (lookupStubs modClass foreign_stubs)
    let stubClasses = outputForeignStubs dflags foreign_stubs modClass
        classes = modClasses ++ stubClasses
    return classes
#else
hscInteractive _ _ = panic "GHC not compiled with interpreter"
#endif
hscInteractive hsc_env cgguts mod_summary = do
    let dflags = hsc_dflags hsc_env
        CgGuts{ -- This is the last use of the ModGuts in a compilation.
                -- From now on, we just use the bits we need.
               cg_module   = this_mod,
               cg_binds    = core_binds,
               cg_tycons   = tycons,
               cg_foreign  = foreign_stubs } = cgguts

        location = ms_location mod_summary
        data_tycons = filter isDataTyCon tycons
        -- cg_tycons includes newtypes, for the benefit of External Core,
        -- but we don't generate any code for newtypes

    -------------------
    -- PREPARE FOR CODE GENERATION
    -- Do saturation and convert to A-normal form
    prepd_binds <- {-# SCC "CorePrep" #-}
                   corePrepPgm hsc_env this_mod location core_binds data_tycons

    (stg_binds, _cost_centre_info)
        <- {-# SCC "CoreToStg" #-}
            myCoreToStg dflags this_mod prepd_binds

    let modClass = moduleJavaClass this_mod
    modClasses <- codeGen hsc_env this_mod location data_tycons stg_binds
                    (panic "hpc_info") (lookupStubs modClass foreign_stubs)
    let stubClasses = outputForeignStubs dflags foreign_stubs modClass
        classes = modClasses ++ stubClasses
    return classes
#else
hscInteractive _ _ = panic "GHC not compiled with interpreter"
#endif
hscInteractive hsc_env cgguts mod_summary = do
    let dflags = hsc_dflags hsc_env
        CgGuts{ -- This is the last use of the ModGuts in a compilation.
                -- From now on, we just use the bits we need.
               cg_module   = this_mod,
               cg_binds    = core_binds,
               cg_tycons   = tycons,
               cg_foreign  = foreign_stubs } = cgguts

        location = ms_location mod_summary
        data_tycons = filter isDataTyCon tycons
        -- cg_tycons includes newtypes, for the benefit of External Core,
        -- but we don't generate any code for newtypes

    -------------------
    -- PREPARE FOR CODE GENERATION
    -- Do saturation and convert to A-normal form
    prepd_binds <- {-# SCC "CorePrep" #-}
                   corePrepPgm hsc_env this_mod location core_binds data_tycons

    (stg_binds, _cost_centre_info)
        <- {-# SCC "CoreToStg" #-}
            myCoreToStg dflags this_mod prepd_binds

    let modClass = moduleJavaClass this_mod
    modClasses <- codeGen hsc_env this_mod location data_tycons stg_binds
                    (panic "hpc_info") (lookupStubs modClass foreign_stubs)
    let stubClasses = outputForeignStubs dflags foreign_stubs modClass
        classes = modClasses ++ stubClasses
    return classes
#else
hscInteractive _ _ = panic "GHC not compiled with interpreter"
#endif