From: simonpj Date: Mon, 25 Jul 2005 11:29:36 +0000 (+0000) Subject: [project @ 2005-07-25 11:29:36 by simonpj] X-Git-Tag: Initial_conversion_from_CVS_complete~325 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=f5c57f6d5ec4b457ef84bd815ab3fa10bcba531a;p=ghc-hetmet.git [project @ 2005-07-25 11:29:36 by simonpj] Wibble to dup-sig reporting --- diff --git a/ghc/compiler/rename/RnBinds.lhs b/ghc/compiler/rename/RnBinds.lhs index cbba768..7fa9611 100644 --- a/ghc/compiler/rename/RnBinds.lhs +++ b/ghc/compiler/rename/RnBinds.lhs @@ -473,14 +473,16 @@ 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 (filter bad sigs) - ; mappM_ dupSigDeclErr (findDupsEq eqHsSig sigs) } + = do { mappM_ unknownSigErr 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 - -- Don't complain about an unbound name again other -> True + -- We use lookupLocatedSigOccRn in the signatures, which is a little bit unsatisfactory -- because this won't work for: -- instance Foo T where