[polyml] Updates to master for 5.9 release

2021-11-13 Thread David Matthews
There have been a number of updates to master since the initial announcement. Thank you for all the feedback. Most of the issues have been about the ARM64 code-generator. Some could be fixed easily but one has required more work. The symptom was an InternalError exception that indicated

[polyml] Detect Current Running OS in Poly/ML

2021-11-13 Thread zacque
Hi, How to detect the current running OS in Poly/ML? I'm looking for something like: datatype Platform = Linux | Windows | macOS | BSD | ... val getPlatform : unit -> Platform If not, how can I implement something like this, if possible? I'm asking because it's useful for writing OS specific

Re: [polyml] Detect Current Running OS in Poly/ML

2021-11-13 Thread David Matthews
Posix.ProcEnv.uname() will give you various strings which will help distinguish between Unix-like systems. The only problem is that the Posix structure is not present on Windows so the code will not compile there. OS.Path.joinDirFile will effectively tell you the directory separator. e.g on

Re: [polyml] Detect Current Running OS in Poly/ML

2021-11-13 Thread zacque
> Posix.ProcEnv.uname() will give you various strings which will help > distinguish between Unix-like systems. > ... > OS.Path.joinDirFile will effectively tell you the directory separator. > e.g on Linux: > OS.Path.joinDirFile{dir="a", file="b"}; > val it = "a/b": string > > on Windows: >>