Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005566OCamlOCaml standard librarypublic2012-03-29 10:062012-04-03 11:11
ReporterHendrik Tews 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version3.12.1 
Target VersionFixed in Version 
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
(0007223)
protz (manager)
2012-03-29 10:38

I can already run the following sequence in a toplevel:

#use "topfind";;
#require "dynlink";;
Dynlink.is_native;;

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...
(0007233)
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.
(0007234)
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).

- 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


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker