|Anonymous | Login | Signup for a new account||2017-09-21 10:50 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005792||OCaml||standard library||public||2012-10-16 01:34||2016-12-08 11:42|
|Priority||normal||Severity||feature||Reproducibility||have not tried|
|Target Version||Fixed in Version|
|Summary||0005792: request for Weak.set_some function|
|Description||Could we get the following function added to the [Weak] module?|
val set_some : 'a t -> int -> 'a -> unit
It would satisfy the equation:
set_some t i a = set t i (Some a)
but would have the benefit that one is not forced to allocate a [Some]
|Tags||No tags attached.|
I would be also glad also to have such a function.
1) It is not practical to implement it as a normal programmer, because one needs access to .h files that are not installed by the compiler.
2) It is a trivial addition.
3) I tried it (by modifying directly byterun/weak.c), and on a benchmark where I used to Weak arrays for memoization (modification of Filliatre BDD library), I gained 10%.
|Sounds like a useful addition to make. Marking this as "Suspended" for now, but a PR is welcome!|
|2012-10-16 01:34||sweeks||New Issue|
|2013-06-06 11:56||bjeannet||Note Added: 0009420|
|2013-06-07 19:03||xleroy||Assigned To||=> doligez|
|2013-06-07 19:03||xleroy||Status||new => acknowledged|
|2016-12-08 11:42||frisch||Note Added: 0016843|
|2016-12-08 11:42||frisch||Status||acknowledged => resolved|
|2016-12-08 11:42||frisch||Resolution||open => suspended|
|2017-02-23 16:43||doligez||Category||OCaml standard library => standard library|
|Copyright © 2000 - 2011 MantisBT Group|