Navigation Menu

Skip to content
New issue

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

match on booleans #3206

Closed
vicuna opened this issue Oct 8, 2004 · 1 comment
Closed

match on booleans #3206

vicuna opened this issue Oct 8, 2004 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Oct 8, 2004

Original bug ID: 3206
Reporter: administrator
Status: closed (set by @mshinwell on 2016-12-06T21:11:54Z)
Resolution: not a bug
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: David Monniaux
Version: 3.09+dev0
OS: Linux/AMD64
Submission from: massena-8-82-225-77-14.fbx.proxad.net (82.225.77.14)

let foo2 hl hr =
match ( >= ) hl (hr + 2) with
| true -> print_endline "miaou2"
| false -> print_endline "coincoin2";;

generates slightly less good code than:

let foo1 hl hr =
if hl >= hr + 2
then
print_endline "miaou1"
else
print_endline "coincoin1";;

(This is for Coq extractions.)

@vicuna
Copy link
Author

vicuna commented Dec 6, 2016

Comment author: @mshinwell

Flambda is about to make the code generation for this identical (if it isn't already) and I don't think we need to keep this issue open to track that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant