diff options
| author | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2006-09-15 21:04:28 +0000 |
|---|---|---|
| committer | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2006-09-15 21:04:28 +0000 |
| commit | bd865113a1446bb18fb32b546b8776b846a23116 (patch) | |
| tree | 9ddc4956a87bc48cb69585ce563d1baba2fab458 /compiler/rename/RnNames.lhs | |
| parent | 7f7be6d1bb33393c1d384923fe938b7c10acbeec (diff) | |
| download | haskell-bd865113a1446bb18fb32b546b8776b846a23116.tar.gz | |
Added error checks & fixed bugs
Thu Aug 3 19:29:38 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au>
* Added error checks & fixed bugs
Diffstat (limited to 'compiler/rename/RnNames.lhs')
| -rw-r--r-- | compiler/rename/RnNames.lhs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs index d1967c8464..6b98283afd 100644 --- a/compiler/rename/RnNames.lhs +++ b/compiler/rename/RnNames.lhs @@ -17,7 +17,7 @@ import DynFlags ( DynFlag(..), GhcMode(..), DynFlags(..) ) import HsSyn ( IE(..), ieName, ImportDecl(..), LImportDecl, ForeignDecl(..), HsGroup(..), HsValBinds(..), Sig(..), collectHsBindLocatedBinders, tyClDeclNames, - instDeclATs, + instDeclATs, isIdxTyDecl, LIE ) import RnEnv import IfaceEnv ( ifaceExportNames ) @@ -446,13 +446,14 @@ getLocalDeclBinders gbl_env (HsGroup {hs_valds = ValBindsIn val_decls val_sigs, new_tc tc_decl = do { main_name <- newTopSrcBinder mod Nothing main_rdr ; sub_names <- mappM (newTopSrcBinder mod (Just main_name)) sub_rdrs - ; return (main_name : sub_names) } + ; if isIdxTyDecl (unLoc tc_decl) -- index type definitions + then return ( sub_names) -- are usage occurences + else return (main_name : sub_names) } where (main_rdr : sub_rdrs) = tyClDeclNames (unLoc tc_decl) inst_ats inst_decl - = mappM (liftM tail . new_tc) (instDeclATs (unLoc inst_decl)) - -- drop main_rdr (already declared in class) + = mappM new_tc (instDeclATs (unLoc inst_decl)) \end{code} |
