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
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
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
> 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:
>>