-
Notifications
You must be signed in to change notification settings - Fork 1
/
scraps
33 lines (31 loc) · 1.79 KB
/
scraps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
-- Add the HMI to the EPS
-- PROBLEM: this occasionally deadlocks! Disaster.
-- It's not a big deal if we don't, because we only pay the
-- extra parsing cost once per module in HPT.
{-
let updateEpsIO_ f = liftIO $ atomicModifyIORef' (hsc_EPS hsc_env) (\s -> (f s, ()))
updateEpsIO_ $ \eps -> eps {
-- TODO: refactor this into a "add ModDetails to EPS"
-- function
eps_PIT = extendModuleEnv (eps_PIT eps) mod (hm_iface hmi),
eps_PTE = extendNameEnvList (eps_PTE eps) (map (\t -> (getName t, t)) (typeEnvElts (md_types (hm_details hmi)))),
eps_rule_base = extendRuleBaseList (eps_rule_base eps) (md_rules (hm_details hmi)),
eps_inst_env = extendInstEnvList (eps_inst_env eps) (md_insts (hm_details hmi)),
eps_fam_inst_env = extendFamInstEnvList (eps_fam_inst_env eps)
(md_fam_insts (hm_details hmi)),
eps_vect_info = plusVectInfo (eps_vect_info eps)
(md_vect_info (hm_details hmi)),
eps_ann_env = extendAnnEnvList (eps_ann_env eps)
(md_anns (hm_details hmi)),
eps_mod_fam_inst_env
= let
fam_inst_env =
extendFamInstEnvList emptyFamInstEnv
(md_fam_insts (hm_details hmi))
in
extendModuleEnv (eps_mod_fam_inst_env eps)
mod
fam_inst_env
-- TODO: NO STATS
}
-}