diff options
author | simonpj@microsoft.com <unknown> | 2006-10-13 09:42:30 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2006-10-13 09:42:30 +0000 |
commit | 5ad61e1470db6dbc8279569c5ad1cc093f753ac0 (patch) | |
tree | f69dd0499b0ed6ec844059956c2338f31be7d6ed /compiler/rename/RnHsDoc.hs | |
parent | 311b1cdfc9b1c311cc53482c461c18cba8885b2a (diff) | |
download | haskell-5ad61e1470db6dbc8279569c5ad1cc093f753ac0.tar.gz |
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
Diffstat (limited to 'compiler/rename/RnHsDoc.hs')
-rw-r--r-- | compiler/rename/RnHsDoc.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rename/RnHsDoc.hs b/compiler/rename/RnHsDoc.hs index 6941da59c1..f3d36907f4 100644 --- a/compiler/rename/RnHsDoc.hs +++ b/compiler/rename/RnHsDoc.hs @@ -1,7 +1,7 @@ module RnHsDoc ( rnHsDoc, rnLHsDoc, rnMbLHsDoc, rnMbHsDoc ) where import TcRnMonad ( RnM ) -import RnEnv ( dataTcOccs, lookupGreRn ) +import RnEnv ( dataTcOccs, lookupGreRn_maybe ) import HsDoc ( HsDoc(..) ) import RdrName ( RdrName, isRdrDataCon, isRdrTc, gre_name ) @@ -49,7 +49,7 @@ rnHsDoc doc = case doc of DocIdentifier ids -> do let choices = concatMap dataTcOccs ids - mb_gres <- mapM lookupGreRn choices + mb_gres <- mapM lookupGreRn_maybe choices case [gre_name gre | Just gre <- mb_gres] of [] -> return (DocString (ids2string ids)) ids' -> return (DocIdentifier ids') |