[project @ 2000-03-27 13:24:12 by simonpj]
[ghc-hetmet.git] / ghc / compiler / DEPEND-NOTES
1                 Notes on module dependencies
2                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
4 The Name/Var/Type group is a bit complicated. Here's the deal
5 Things in brackets are what the module *uses*.
6 A 'loop' indicates a use from a module compiled later
7
8         Name, PrimRep, FieldLabel (loop Type.Type)
9 then
10         Var (loop CoreSyn.CoreExpr, loop IdInfo.IdInfo, 
11              loop Type.GenType, loop Type.Kind)
12 then
13         VarEnv, VarSet, ThinAir
14 then
15         Class (loop TyCon.TyCon, loop Type.Type, loop InstEnv.InstEnv)
16 then
17         TyCon (loop Type.Type, loop Type.Kind, loop DataCon.DataCon)
18 then
19         Type (loop DataCon.DataCon, loop Subst.substTy)
20 then
21         TysPrim (Type), PprEnv (loop DataCon.DataCon, Type)
22 then
23         Unify, PprType (PprEnv)
24 then
25         Literal (TysPrim, PprType), DataCon
26 then
27         InstEnv (Unify)
28 then
29         TysWiredIn (DataCon.mkDataCon, loop MkId.mkDataConId)
30 then
31         PrimOp (PprType, TysWiredIn)
32 then
33         CoreSyn
34 then
35         IdInfo (loop CoreSyn.CoreRules etc, loop CoreUnfold.Unfolding) 
36 then
37         Id (lots from IdInfo)
38 then
39         CoreFVs, PprCore
40 then
41         CoreUtils (PprCore.pprCoreExpr, CoreFVs.exprFreeVars,
42                    loop CoreUnfold.isEvaldUnfolding CoreUnfold.maybeUnfoldingTemplate)
43 then    
44         OccurAnal (CoreUtils.exprIsTrivial)
45 then
46         CoreUnfold (OccurAnal.occurAnalyseGlobalExpr)
47 then
48         Rules (Unfolding), Subst (Unfolding, CoreFVs), CoreTidy (noUnfolding)
49 then
50         MkId (CoreUnfold.mkUnfolding, Subst)
51
52