Fixed a couple of missing lines in the usage checker for intrinsic function calls

This commit is contained in:
Neil Brown 2009-02-03 13:46:26 +00:00
parent 359763380e
commit cf79df4164

View File

@ -191,11 +191,13 @@ variableToVar = Var
annotateVars :: A.ExpressionList -> [A.Variable] -> [(A.Variable, Maybe A.Expression)]
annotateVars (A.FunctionCallList {}) vs = zip vs (repeat Nothing)
annotateVars (A.IntrinsicFunctionCallList {}) vs = zip vs (repeat Nothing)
annotateVars (A.ExpressionList _ es) vs = zip vs (map Just es ++ repeat Nothing)
getVarExpList :: A.ExpressionList -> Vars
getVarExpList (A.ExpressionList _ es) = foldUnionVars $ map getVarExp es
getVarExpList (A.FunctionCallList _ _ es) = foldUnionVars $ map getVarExp es --TODO record stuff in passed as well?
getVarExpList (A.IntrinsicFunctionCallList _ _ es) = foldUnionVars $ map getVarExp es --TODO record stuff in passed as well?
getVarExp :: A.Expression -> Vars
getVarExp = everything unionVars (emptyVars `mkQ` getVarExp')