Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003206OCamlOCaml generalpublic2004-10-09 00:042016-12-06 22:11
Reporteradministrator 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0003206: match on booleans
DescriptionFull_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.)

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0016668)
shinwell (developer)
2016-12-06 22:11

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.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue
2016-12-06 22:11 shinwell Note Added: 0016668
2016-12-06 22:11 shinwell Status acknowledged => closed
2016-12-06 22:11 shinwell Resolution open => no change required


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker