@@ -486,14 +486,16 @@ pFixity = do pushIndent
486486 istate <- getState
487487 let infixes = idris_infixes istate
488488 let fs = map (Fix (f prec)) ops
489− let redecl = map (alreadyDeclared infixes) fs
490− if False `notElem` map checkValidity redecl
489+ let redecls = map (alreadyDeclared infixes) fs
490+ let ill = filter (not . checkValidity) redecls
491+ if null ill
491492 then do setState (istate { idris_infixes = nub $ sort (fs ++ infixes)
492493 , ibc_write = map IBCFix fs ++ ibc_write istate
493494 })
494495 fc <- pfc
495496 return (PFix fc (f prec) ops)
496− else fail "Illegal redeclaration of fixity"
497+ else fail $ concatMap (\(f, (x:xs)) -> "Illegal redeclaration of fixity: \""
498+ ++ show f ++ "\" overrides \"" ++ show x ++ "\"\n") ill
497499 where alreadyDeclared :: [FixDecl] -> FixDecl -> (FixDecl, [FixDecl])
498500 alreadyDeclared fs f = (f, filter ((extractName f ==) . extractName) fs)
499501