We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ECond(x,1,0)
generate.ml emits very weird-looking code for converting to boolean with the following helper:
generate.ml
let bool e = J.ECond (e, one, zero)
Examples of use:
register_bin_prim "caml_eq_float" `Pure (fun cx cy _ -> bool (J.EBin (J.FloatEqEq, float_val cx, float_val cy))); register_bin_prim "caml_neq_float" `Pure (fun cx cy _ -> bool (J.EBin (J.FloatNotEq, float_val cx, float_val cy))); register_bin_prim "caml_ge_float" `Pure (fun cx cy _ -> bool (J.EBin (J.FloatLe, float_val cy, float_val cx))); register_bin_prim "caml_le_float" `Pure (fun cx cy _ -> bool (J.EBin (J.FloatLe, float_val cx, float_val cy))); register_bin_prim "caml_gt_float" `Pure (fun cx cy _ -> bool (J.EBin (J.FloatLt, float_val cy, float_val cx))); register_bin_prim "caml_lt_float" `Pure (fun cx cy _ -> bool (J.EBin (J.FloatLt, float_val cx, float_val cy)));
Probably this deserves special Rehp tree node to express "cast to bool". Dumping this idea into the issue so that it's not forgotten.
The text was updated successfully, but these errors were encountered:
ECond(x,0,1)
No branches or pull requests
generate.ml
emits very weird-looking code for converting to boolean with the following helper:Examples of use:
Probably this deserves special Rehp tree node to express "cast to bool". Dumping this idea into the issue so that it's not forgotten.
The text was updated successfully, but these errors were encountered: