Open rebcabin opened 1 year ago
Yes, for now we kept it like this. We can tighten it to real_binop, integer_binop, etc.
I did the following for full-form. Legacy is as in ASDL
(enum-like logicalbinop #{'And 'Or 'Xor 'NEqv 'Eqv})
;; Collisions of names are NOT ALLOWED
;; See Legacy Sugar for RealBinOp.
(enum-like real-binop #{'RAdd 'RSub 'RMul 'RDiv 'RPow})
(enum-like integer-binop #{'Add 'Sub 'Mul 'Div 'Pow
'BitAnd 'BitOr 'BitXor
'BitLShift 'BitRShift})
(enum-like cmpop #{'Eq 'NotEq 'Lt 'LtE 'Gt 'GtE })
;; Collisions of names are NOT ALLOWED!
;; See Legacy Sugar for LogicalCompare.
(enum-like logicalcmpop #{'LEq 'LNotEq})
Looks like
binop
contains polymorphic operators, valid forReal
,Integer
,Complex
, plus some things that are valid only forInteger
. Do we define tighter types for these operators? If so, how