yes pattern based is a way i think ,i suppose it can solve the overloaded operator problem ,but notice that when dealing operator one by one in the pattern , a user can have defined a new operator not in the pattern cases ,but perheaps i did not well understood your code if expr0 deal with specific user defined operator...
note about overload operator problem: it is the fact that when you want to compare the operator to find precedence rules you must compare quoted operators or symbols ,if you use procedure comparaison the <procedure +> could be different from <new procedure + overloaded> a way i find to solve the operator overloaded problem is quote all operators and evaluate them later (works in Guile) or rebuild a precedence list of operator each time i call the infix with precedence evaluation. Then in the precedence list :
(define infix-operators
(list
(list expt **)
(list * / %)
(list + -)
(list << >>)
(list & ∣ )
(list < > = <> ≠ <= >=)
;;(list 'dummy) ;; can keep the good order in case of non left-right assocciative operators.(odd? reverse them)
)
)
the operators are up to date with the last definitions known. (note that in the previous list operators are NOT quoted)
and this solution is only working if i have my scheme-infix.rkt module included , it is not working if required in a module because the data are then encapsulated in the module and again i have to test that in real code,not only in simple examples sometimes only made at REPL, anyway a good solution seems to make all the overload before the scheme-infix.rkt is read,so the code included (not required) know all the procedures bind to operators symbols.