You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 6494 Reporter:@whitequark Assigned to:@gasche Status: closed (set by @xavierleroy on 2016-12-07T10:37:17Z) Resolution: fixed Priority: normal Severity: feature Version: 4.02.0+beta1 / +rc1 Target version: undecided Category: standard library Tags: junior_job Monitored by:@gasche@hcarty
Bug description
Currently, 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.
The text was updated successfully, but these errors were encountered:
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.
Original bug ID: 6494
Reporter: @whitequark
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2016-12-07T10:37:17Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 4.02.0+beta1 / +rc1
Target version: undecided
Category: standard library
Tags: junior_job
Monitored by: @gasche @hcarty
Bug description
Currently, 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.
The text was updated successfully, but these errors were encountered: