Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
75069956
Commit
75069956
authored
Aug 11, 2005
by
simonpj
Browse files
[project @ 2005-08-11 08:22:11 by simonpj]
Fix bogon in reporting of duplicate sigs; make mod68 work again
parent
89627230
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/rename/RnBinds.lhs
View file @
75069956
...
...
@@ -300,6 +300,8 @@ rnValBinds trim (ValBindsIn mbinds sigs)
; let (binds', bind_dus) = depAnalBinds binds_w_dus
-- We do the check-sigs after renaming the bindings,
-- so that we have convenient access to the binders
; check_sigs (okBindSig (duDefs bind_dus)) sigs'
; return (ValBindsOut binds' sigs',
...
...
@@ -309,8 +311,8 @@ rnValBinds trim (ValBindsIn mbinds sigs)
---------------------
depAnalBinds :: Bag (LHsBind Name, [Name], Uses)
-> ([(RecFlag, LHsBinds Name)], DefUses)
-- Dependency analysis; this is important so that
unused-binding
-- reporting is accurate
-- Dependency analysis; this is important so that
--
unused-binding
reporting is accurate
depAnalBinds binds_w_dus
= (map get_binds sccs, map get_du sccs)
where
...
...
@@ -499,11 +501,10 @@ check_sigs :: (LSig Name -> Bool) -> [LSig Name] -> RnM ()
check_sigs ok_sig sigs
-- Check for (a) duplicate signatures
-- (b) signatures for things not in this group
= do { mappM_ unknownSigErr sigs
'
; mappM_ dupSigDeclErr (findDupsEq eqHsSig sigs
'
) }
= do { mappM_ unknownSigErr
(filter bad
sigs
)
; mappM_ dupSigDeclErr (findDupsEq eqHsSig sigs) }
where
-- Don't complain about an unbound name again
sigs' = filter bad sigs
bad sig = not (ok_sig sig) &&
case sigName sig of
Just n | isUnboundName n -> False
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment