diff --git a/optimize/src/BindingOpt.curry b/optimize/src/BindingOpt.curry index 79e226d823dbaf538ab58ae5185ad03c40334792..520c8beecc6070e6419dbc2e3704b426568e25ce 100644 --- a/optimize/src/BindingOpt.curry +++ b/optimize/src/BindingOpt.curry @@ -193,7 +193,7 @@ transformFuncDecl lookupreqinfo fdecl@(Func qf@(_,fn) ar vis texp rule) = ------------------------------------------------------------------------- -- State threaded through the program transformer: -- * name of current function --- * number of occurrences of (==) that are replaced by (=:=) +-- * number of occurrences of (==) that are replaced by 'constrEq' data TState = TState QName Int initTState :: QName -> TState @@ -210,11 +210,11 @@ incOccNumber (TState qf on) = TState qf (on+1) --- values. If there is an occurrence of (e1==e2) where the value `True` --- is required, then this occurrence is replaced by --- ---- (e1=:=e2) +--- (constrEq e1 e2) --- --- Similarly, (e1/=e2) with required value `False` is replaced by --- ---- (not (e1=:=e2)) +--- (not (constrEq e1 e2)) transformRule :: (QName -> Maybe AFType) -> TState -> Rule -> (TState,Rule) transformRule _ tst (External s) = (tst, External s) @@ -227,11 +227,11 @@ transformRule lookupreqinfo tstr (Rule args rhs) = transformExp tst (Lit v) _ = (Lit v, tst) transformExp tst0 exp@(Comb ct qf es) reqval | reqval == aTrue && isBoolEqualCall "==" exp - = (Comb FuncCall (pre "=:=") (argsOfBoolEqualCall "==" (Comb ct qf tes)) + = (Comb FuncCall (pre "constrEq") (argsOfBoolEqualCall "==" (Comb ct qf tes)) , incOccNumber tst1) | reqval == aFalse && isBoolEqualCall "/=" exp = (Comb FuncCall (pre "not") - [Comb FuncCall (pre "=:=") (argsOfBoolEqualCall "/=" (Comb ct qf tes))] + [Comb FuncCall (pre "constrEq") (argsOfBoolEqualCall "/=" (Comb ct qf tes))] , incOccNumber tst1) | qf == pre "$" && length es == 2 && (isFuncPartCall (head es) || isConsPartCall (head es)) @@ -478,7 +478,7 @@ statSummary = concatMap showSum then "" else "Function "++fn++": "++ (if teqs==1 then "one occurrence" else show teqs++" occurrences") ++ - " of (==) transformed into (=:=)\n" + " of (==) transformed into 'constrEq'\n" --- Translate statistics into CSV format: stats2csv :: [TransStat] -> [[String]]