[project @ 2000-03-25 12:38:40 by panne]
[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 Const.Con, 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         IdInfo (loop CoreSyn.CoreRules, loop CoreUnfold.Unfolding) 
34 then
35         Const (PrimOp.PrimOp, TysWiredIn.stringTy)
36 then
37         Id (Const.Con(..)), CoreSyn
38 then
39         CoreFVs, PprCore
40 then
41         CoreUtils (PprCore.pprCoreExpr, CoreFVs.exprFreeVars)
42 then    
43         OccurAnal (ThinAir.noRepStrs -- an awkward dependency)
44 then
45         CoreUnfold (loop OccurAnal.globalOccurAnalyse)
46 then
47         Rules (Unfolding), Subst (Unfolding, CoreFVs), CoreTidy (noUnfolding)
48 then
49         MkId (CoreUnfold.mkUnfolding, Subst)
50
51