|Anonymous | Login | Signup for a new account||2016-09-29 10:29 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005566||OCaml||OCaml standard library||public||2012-03-29 10:06||2012-04-03 11:11|
|Priority||normal||Severity||feature||Reproducibility||have not tried|
|Target Version||Fixed in Version|
|Summary||0005566: Duplicate Dynlink.is_native as Sys.is_native|
|Description||I would like to suggest to have the is_native flag also in module|
Sys. This way, code running in the toplevel could distinguish
whether it is running inside ocaml or inside ocamlnat, in order
to decide whether it should call Topdirs.load_file with cmo or
|Tags||No tags attached.|
I can already run the following sequence in a toplevel:
Is that not enough? There's different Dynlink implementations in the source tree, so it's easy to define is_native as being true or false, but I'm not sure how we would do that inside the Sys module...
Hendrik Tews (reporter)
Having Sys.is_native is useful especially in those cases where
the dynlink library is not required. In those cases one doesn't
really want to load findlib and dynlink to access just one boolean.
One can always check at program invocation whether one is going
to run a native program and use different source code or
additional arguments for the native program.
> I'm not sure how we would do that inside the Sys module...
We could have the runtime environment provide such a function (with different implementation in byterun and asmrun).
|2012-03-29 10:06||Hendrik Tews||New Issue|
|2012-03-29 10:38||protz||Note Added: 0007223|
|2012-03-29 10:38||protz||Status||new => feedback|
|2012-03-29 11:46||Hendrik Tews||Note Added: 0007233|
|2012-03-29 11:46||Hendrik Tews||Status||feedback => new|
|2012-03-29 12:38||frisch||Status||new => acknowledged|
|2012-03-29 12:39||frisch||Note Added: 0007234|
|Copyright © 2000 - 2011 MantisBT Group|