Commit e528061e authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

We also need to retypecheck before when we do parallel make.

Kept this seperate from the previous patch for clarity.
Comes with a test.
Signed-off-by: default avatarEdward Z. Yang <>

Test Plan: validate

Reviewers: simonpj, austin, bgamari

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #12035
parent 8fd18488
......@@ -1048,9 +1048,18 @@ parUpsweep_one mod home_mod_map comp_graph_loops lcl_dflags cleanup par_sem
let lcl_mod = localize_mod mod
let lcl_hsc_env = localize_hsc_env hsc_env
-- Re-typecheck the loop
type_env_var <- liftIO $ newIORef emptyNameEnv
let lcl_hsc_env' = lcl_hsc_env { hsc_type_env_var =
Just (ms_mod lcl_mod, type_env_var) }
lcl_hsc_env'' <- case finish_loop of
Nothing -> return lcl_hsc_env'
Just loop -> typecheckLoop lcl_dflags lcl_hsc_env' $
map (moduleName . fst) loop
-- Compile the module.
mod_info <- upsweep_mod lcl_hsc_env old_hpt stable_mods lcl_mod
mod_index num_mods
mod_info <- upsweep_mod lcl_hsc_env'' old_hpt stable_mods
lcl_mod mod_index num_mods
return (Just mod_info)
case mb_mod_info of
......@@ -83,6 +83,7 @@ extra_src_files = {
'T11824': ['TyCon.hs', 'Type.hs', 'Type.hs-boot', 'Unbound/'],
'T11827': ['A.hs', 'A.hs-boot', 'B.hs'],
'T12062': ['A.hs', 'A.hs-boot', 'C.hs'],
'T12035j': ['T12035.hs', 'T12035a.hs', 'T12035.hs-boot'],
'T1372': ['p1/', 'p2/'],
'T1407': ['A.c'],
'T1959': ['B.hs', 'C.hs', 'D.hs', 'E1.hs', 'E2.hs'],
T12035.hs:3:1: error:
Type constructor ‘T’ has conflicting definitions in the module
and its hs-boot file
Main module: type T = Bool
Boot file: abstract T
......@@ -420,6 +420,8 @@ test('T11990a', normal, compile_fail, [''])
test('T11990b', normal, compile_fail, [''])
test('T12035', extra_clean(['T12035.hi-boot', 'T12035.o-boot', 'T12035a.hi', 'T12035a.o']),
multimod_compile_fail, ['T12035', '-v0'])
test('T12035j', extra_clean(['T12035.hi-boot', 'T12035.o-boot', 'T12035a.hi', 'T12035a.o']),
multimod_compile_fail, ['T12035', '-j2 -v0'])
test('T12063', [ expect_broken(12063), extra_clean(['T12063.hi-boot', 'T12063.o-boot', 'T12063a.hi', 'T12063a.o']) ],
multimod_compile_fail, ['T12063', '-v0'])
test('T11974b', normal, compile_fail, [''])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment