Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005566OCamlstandard librarypublic2012-03-29 10:062016-12-06 16:01
ReporterHendrik Tews 
Assigned Tofrisch 
PrioritynormalSeverityfeatureReproducibilityhave not tried
PlatformOSOS Version
Product Version3.12.1 
Target VersionFixed in Version4.04.0 
Summary0005566: Duplicate Dynlink.is_native as Sys.is_native
DescriptionI 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
cmxs arguments.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
protz (manager)
2012-03-29 10:38

I can already run the following sequence in a toplevel:

#use "topfind";;
#require "dynlink";;

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)
2012-03-29 11:46

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.
frisch (developer)
2012-03-29 12:39

> 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).
frisch (developer)
2016-12-06 16:01

We have Sys.backend_type (since 4.04).

- Issue History
Date Modified Username Field Change
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
2016-12-06 16:01 frisch Note Added: 0016642
2016-12-06 16:01 frisch Status acknowledged => resolved
2016-12-06 16:01 frisch Resolution open => fixed
2016-12-06 16:01 frisch Assigned To => frisch
2016-12-06 16:01 frisch Fixed in Version => 4.04.0
2017-02-23 16:43 doligez Category OCaml standard library => standard library

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker