[project @ 2002-02-11 08:20:38 by chak]
[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 
9 then
10         PrelNames
11 then
12         Var (Name, loop IdInfo.IdInfo, 
13              loop Type.Type, loop Type.Kind)
14 then
15         VarEnv, VarSet, ThinAir
16 then
17         Class (loop TyCon.TyCon, loop Type.Type)
18 then
19         TyCon (loop Type.Type, loop Type.Kind, loop DataCon.DataCon, loop Generics.GenInfo)
20 then
21         Type (loop DataCon.DataCon, loop Subst.substTy)
22 then
23         FieldLabel( Type), TysPrim (Type), PprEnv (loop DataCon.DataCon, Type)
24 then
25         Unify, PprType (PprEnv)
26 then
27         Literal (TysPrim, PprType), DataCon (loop PprType)
28 then
29         TysWiredIn (DataCon.mkDataCon, loop MkId.mkDataConId, loop Generics.mkGenInfo)
30 then
31         TcType( lots of TysWiredIn stuff)
32 then
33         PprType( lots of TcType stuff )
34 then
35         PrimOp (PprType, TysWiredIn)
36 then
37         CoreSyn
38 then
39         IdInfo (CoreSyn.Unfolding, CoreSyn.CoreRules)
40 then
41         Id (lots from IdInfo)
42 then
43         CoreFVs, PprCore
44 then
45         CoreUtils (PprCore.pprCoreExpr, CoreFVs.exprFreeVars,
46                    CoreSyn.isEvaldUnfolding CoreSyn.maybeUnfoldingTemplate)
47 then    
48         OccurAnal (CoreUtils.exprIsTrivial)
49 then
50         CoreUnfold (OccurAnal.occurAnalyseGlobalExpr)
51 then
52         Rules (Unfolding), Subst (Unfolding, CoreFVs), CoreTidy (noUnfolding), Generics (mkTopUnfolding)
53 then
54         MkId (CoreUnfold.mkUnfolding, Subst)
55 then
56         PrelInfo (MkId)
57