Improved the error message given by ArrayUsageCheck

This commit is contained in:
Neil Brown 2008-01-26 22:57:01 +00:00
parent 127cdea242
commit d37253d2af

View File

@ -100,9 +100,9 @@ checkArrayUsage graph = sequence_ $ checkPar checkArrayUsage' graph
do sol <- formatSolution varMapping (getCounterEqs vm) do sol <- formatSolution varMapping (getCounterEqs vm)
cx <- showCode lx cx <- showCode lx
cy <- showCode ly cy <- showCode ly
dieP m $ "Overlapping indexes of array \"" ++ userArrName ++ "\"" dieP m $ "Indexes of array \"" ++ userArrName ++ "\""
++ "(\"" ++ cx ++ "\" could overlap with \"" ++ cy ++ "\")" ++ "(\"" ++ cx ++ "\" and \"" ++ cy ++ "\") could overlap"
++ " when: " ++ sol ++ if sol /= "" then " when: " ++ sol else ""
solve :: (labels,vm,(EqualityProblem,InequalityProblem)) -> Maybe (labels,vm,VariableMapping) solve :: (labels,vm,(EqualityProblem,InequalityProblem)) -> Maybe (labels,vm,VariableMapping)
solve (ls,vm,(eq,ineq)) = case solveProblem eq ineq of solve (ls,vm,(eq,ineq)) = case solveProblem eq ineq of