From 3fd373e4acc98b23879729ba48e983a60ea34fb0 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Tue, 7 Apr 2009 16:12:03 +0000 Subject: [PATCH] Stopped calls to the user-defined operators being pulled up --- transformations/SimplifyExprs.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transformations/SimplifyExprs.hs b/transformations/SimplifyExprs.hs index 656ae2b..f8dd9ff 100644 --- a/transformations/SimplifyExprs.hs +++ b/transformations/SimplifyExprs.hs @@ -555,7 +555,7 @@ pullUp pullUpArraysInsideRecords = pass "Pull up definitions" doExpression' :: A.Expression -> PassM A.Expression -- Convert single-valued function calls. - doExpression' (A.FunctionCall m n es) + doExpression' (A.FunctionCall m n es) | not $ builtInOperatorFunction n = do [v] <- convertFuncCall m n es return $ A.ExprVariable m v -- Convert SubscriptedExprs into SubscriptedVariables. @@ -571,6 +571,7 @@ pullUp pullUpArraysInsideRecords = pass "Pull up definitions" doExpressionList :: A.ExpressionList -> PassM A.ExpressionList -- Convert multi-valued function calls. doExpressionList (A.FunctionCallList m n es) + | not (builtInOperatorFunction n) = do vs <- convertFuncCall m n es return $ A.ExpressionList m [A.ExprVariable m v | v <- vs] doExpressionList el = descend el