More refactoring in RnNames
authorsimonpj@microsoft.com <unknown>
Fri, 13 Oct 2006 09:42:30 +0000 (09:42 +0000)
committersimonpj@microsoft.com <unknown>
Fri, 13 Oct 2006 09:42:30 +0000 (09:42 +0000)
commit5ad61e1470db6dbc8279569c5ad1cc093f753ac0
treef69dd0499b0ed6ec844059956c2338f31be7d6ed
parent311b1cdfc9b1c311cc53482c461c18cba8885b2a
More refactoring in RnNames

I rather self-indulgently spent a chunk of yesterday working on
refactoring RnNames further.  The result is significantly simpler:

* A GlobalRdrElt gets an extra field, gre_par, which records
  the parent (if any) of the name

* ImportAvails has two fields deleted: imp_env and imp_parent.
  The information provided by these fields was only used when
  processing the export list; and the same information is now readily
  generated from the GlobalRdrElts in the GlobalRdrEnv

I also did some tidying up; notably moving AvailEnv stuff from
TcRnTypes to RnNames.

The result is tha the compiler is some 130 lines shorter than before
compiler/basicTypes/RdrName.lhs
compiler/main/HscTypes.lhs
compiler/rename/RnEnv.lhs
compiler/rename/RnExpr.lhs
compiler/rename/RnHsDoc.hs
compiler/rename/RnNames.lhs
compiler/typecheck/TcRnDriver.lhs
compiler/typecheck/TcRnMonad.lhs
compiler/typecheck/TcRnTypes.lhs