Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006494OCamlOCaml standard librarypublic2014-07-22 15:412014-12-21 12:53
Reporterwhitequark 
Assigned Togasche 
PrioritynormalSeverityfeatureReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.02.0+beta1 / +rc1 
Target VersionundecidedFixed in Version 
Summary0006494: Expose caml_string_equal &c to OCaml
DescriptionCurrently, it is possible to call an optimized equality function by forcing specialization, e.g. with:

   let string_eq = fun (a:string) b -> a = b

However, it's fragile and not guaranteed by anything in the compiler.

I think modules Char/String/Bytes/Int64/Int32/Nativeint should definitely offer an "equal" function. I'm not sure where the corresponding functions for bool, int and float should go.
Tagsjunior_job
Attached Files

- Relationships

-  Notes
(0011954)
dinosaure (reporter)
2014-07-31 15:35

I send a new PR :) https://github.com/ocaml/ocaml/pull/84 [^]
(0012904)
gasche (developer)
2014-12-21 12:52

I merged dinosaure's patch in trunk. There may be some further changes depending on whether people think the name "equal" has a too-high risk of shadowing existing names when opening modules.

- Issue History
Date Modified Username Field Change
2014-07-22 15:41 whitequark New Issue
2014-07-22 15:42 yallop Tag Attached: junior_job
2014-07-30 22:57 doligez Status new => confirmed
2014-07-30 22:57 doligez Target Version => 4.02.1+dev
2014-07-31 15:35 dinosaure Note Added: 0011954
2014-09-04 00:25 doligez Target Version 4.02.1+dev => undecided
2014-09-15 16:13 doligez Severity minor => feature
2014-12-21 12:52 gasche Note Added: 0012904
2014-12-21 12:52 gasche Status confirmed => resolved
2014-12-21 12:52 gasche Resolution open => fixed
2014-12-21 12:52 gasche Assigned To => gasche


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker