projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactor part of the renamer to fix Trac #3901
[ghc-hetmet.git]
/
compiler
/
rename
/
RnBinds.lhs
diff --git
a/compiler/rename/RnBinds.lhs
b/compiler/rename/RnBinds.lhs
index
5773108
..
2cf2bdc
100644
(file)
--- a/
compiler/rename/RnBinds.lhs
+++ b/
compiler/rename/RnBinds.lhs
@@
-179,7
+179,7
@@
rnTopBinds :: HsValBinds RdrName
-> RnM (HsValBinds Name, DefUses)
rnTopBinds b =
do nl <- rnTopBindsLHS emptyFsEnv b
-> RnM (HsValBinds Name, DefUses)
rnTopBinds b =
do nl <- rnTopBindsLHS emptyFsEnv b
- let bound_names = map unLoc (collectHsValBinders nl)
+ let bound_names = collectHsValBinders nl
bindLocalNames bound_names $ rnTopBindsRHS (mkNameSet bound_names) nl
bindLocalNames bound_names $ rnTopBindsRHS (mkNameSet bound_names) nl
@@
-261,7
+261,7
@@
rnValBindsLHS fix_env binds
-- g = let f = ... in f
-- should.
; binds' <- rnValBindsLHSFromDoc (localRecNameMaker fix_env) binds
-- g = let f = ... in f
-- should.
; binds' <- rnValBindsLHSFromDoc (localRecNameMaker fix_env) binds
- ; let bound_names = map unLoc $ collectHsValBinders binds'
+ ; let bound_names = collectHsValBinders binds'
; envs <- getRdrEnvs
; checkDupAndShadowedNames envs bound_names
; return (bound_names, binds') }
; envs <- getRdrEnvs
; checkDupAndShadowedNames envs bound_names
; return (bound_names, binds') }
@@
-276,7
+276,7
@@
rnValBindsLHSFromDoc topP (ValBindsIn mbinds sigs)
= do { mbinds' <- mapBagM (rnBindLHS topP doc) mbinds
; return $ ValBindsIn mbinds' sigs }
where
= do { mbinds' <- mapBagM (rnBindLHS topP doc) mbinds
; return $ ValBindsIn mbinds' sigs }
where
- bndrs = collectHsBindBinders mbinds
+ bndrs = collectHsBindsBinders mbinds
doc = text "In the binding group for:" <+> pprWithCommas ppr bndrs
rnValBindsLHSFromDoc _ b = pprPanic "rnValBindsLHSFromDoc" (ppr b)
doc = text "In the binding group for:" <+> pprWithCommas ppr bndrs
rnValBindsLHSFromDoc _ b = pprPanic "rnValBindsLHSFromDoc" (ppr b)