addl (gp { hs_tyclds = L l d : ts,
hs_fixds = fsigs ++ fs,
hs_docs = add_doc decl docs}) ds
+ | isIdxTyDecl d =
+ addl (gp { hs_tyclds = L l d : ts }) ds
| otherwise =
addl (gp { hs_tyclds = L l d : ts,
hs_docs = add_doc decl docs }) ds
| otherwise
= do { mb_gre <- lookupGreLocalRn rdr_name
; case mb_gre of
- Nothing -> unboundName rdr_name
+ Nothing -> do
+ traceRn $ text "lookupTopBndrRn"
+ unboundName rdr_name
Just gre -> returnM (gre_name gre) }
-- lookupLocatedSigOccRn is used for type signatures and pragmas
--
lookupFamInstDeclBndr :: Module -> Located RdrName -> RnM Name
lookupFamInstDeclBndr mod lrdr_name@(L _ rdr_name)
- | not (isSrcRdrName rdr_name)
- = lookupImportedName rdr_name
-
- | otherwise
- = -- First look up the name in the normal environment.
- lookupGreRn_maybe rdr_name `thenM` \ mb_gre ->
- case mb_gre of {
- Just gre -> returnM (gre_name gre) ;
- Nothing -> newTopSrcBinder mod lrdr_name }
+ = do { mb_gre <- lookupGreRn_maybe rdr_name
+ ; case mb_gre of
+ Just gre -> returnM (gre_name gre) ;
+ Nothing -> newTopSrcBinder mod lrdr_name }
--------------------------------------------------
-- Occurrences
if isQual rdr_name && mod == iNTERACTIVE then
-- This test is not expensive,
lookupQualifiedName rdr_name -- and only happens for failed lookups
- else
+ else do
+ traceRn $ text "lookupGlobalOccRn"
unboundName rdr_name }
lookupImportedName :: RdrName -> TcRnIf m n Name
; case mb_gre of {
Just gre -> return gre ;
Nothing -> do
- { name <- unboundName rdr_name
+ { traceRn $ text "lookupGreRn"
+ ; name <- unboundName rdr_name
; return (GRE { gre_name = name, gre_par = NoParent,
gre_prov = LocalDef }) }}}
-- So we content ourselves with gathering uses only; that
-- means we'll only report a declaration as unused if it isn't
-- mentioned at all. Ah well.
+ traceRn (text "Start rnTyClDecls") ;
(rn_tycl_decls, src_fvs1)
<- mapFvRn (wrapLocFstM rnTyClDecl) tycl_decls ;
+ traceRn (text "finish rnTyClDecls") ;
(rn_inst_decls, src_fvs2)
<- mapFvRn (wrapLocFstM rnSrcInstDecl) inst_decls ;
(rn_deriv_decls, src_fvs_deriv)
-- the rnDocEntity stuff reports the errors again.
failIfErrsM ;
+ traceRn (text "Start rnDocEntitys") ;
rn_docs <- mapM rnDocEntity docs ;
+ traceRn (text "finish rnDocEntitys") ;
let {
rn_group = HsGroup { hs_valds = rn_val_decls,