Notes on module dependencies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The Name/Var/Type group is a bit complicated. Here's the deal Things in brackets are what the module *uses*. A 'loop' indicates a use from a module compiled later Name, PrimRep, FieldLabel (loop Type.Type) then Var (loop Const.Con, loop IdInfo.IdInfo, loop Type.GenType, loop Type.Kind) then VarEnv, VarSet, ThinAir then Class (loop TyCon.TyCon, loop Type.Type, loop InstEnv.InstEnv) then TyCon (loop Type.Type, loop Type.Kind, loop DataCon.DataCon) then Type (loop DataCon.DataCon, loop Subst.substTy) then TysPrim (Type), PprEnv (loop DataCon.DataCon, Type) then Unify, PprType (PprEnv) then Literal (TysPrim, PprType), DataCon then InstEnv (Unify) then TysWiredIn (DataCon.mkDataCon, loop MkId.mkDataConId) then PrimOp (PprType, TysWiredIn) then IdInfo (loop CoreSyn.CoreRules, loop CoreUnfold.Unfolding) then Const (PrimOp.PrimOp, TysWiredIn.stringTy) then Id (Const.Con(..)), CoreSyn then CoreFVs, PprCore then CoreUtils (PprCore.pprCoreExpr, CoreFVs.exprFreeVars) then OccurAnal (ThinAir.noRepStrs -- an awkward dependency) then CoreUnfold (loop OccurAnal.globalOccurAnalyse) then Rules (Unfolding), Subst (Unfolding, CoreFVs), CoreTidy (noUnfolding) then MkId (CoreUnfold.mkUnfolding, Subst)