The order of the elements in the output of infer_binary_op_type_sub isn't consistent across the various operators. For example, OpLt returns Some (Bool, Nat, Nat), i.e. (output, input, input) (source), whereas OpFloatCompare returns Some (Float, Float, Bool), i.e. (input, input, output) (source). This makes it hard to extract the output type of a binary operator in Ergo, a language we're building using QCert.
The order of the elements in the output of
infer_binary_op_type_sub
isn't consistent across the various operators. For example,OpLt
returnsSome (Bool, Nat, Nat)
, i.e.(output, input, input)
(source), whereasOpFloatCompare
returnsSome (Float, Float, Bool)
, i.e.(input, input, output)
(source). This makes it hard to extract the output type of a binary operator in Ergo, a language we're building using QCert.(cc @jeromesimeon)