src/Pure/ML/ml_system.ML
changeset 72535 7cb68b5b103d
parent 69701 b5ecabcfb780
child 73228 0575cfd2ecfc
equal deleted inserted replaced
72534:e0c6522d5d43 72535:7cb68b5b103d
     8 sig
     8 sig
     9   val name: string
     9   val name: string
    10   val platform: string
    10   val platform: string
    11   val platform_is_windows: bool
    11   val platform_is_windows: bool
    12   val platform_is_64: bool
    12   val platform_is_64: bool
       
    13   val platform_is_arm: bool
    13   val platform_path: string -> string
    14   val platform_path: string -> string
    14   val standard_path: string -> string
    15   val standard_path: string -> string
    15 end;
    16 end;
    16 
    17 
    17 structure ML_System: ML_SYSTEM =
    18 structure ML_System: ML_SYSTEM =
    19 
    20 
    20 val SOME name = OS.Process.getEnv "ML_SYSTEM";
    21 val SOME name = OS.Process.getEnv "ML_SYSTEM";
    21 val SOME platform = OS.Process.getEnv "ML_PLATFORM";
    22 val SOME platform = OS.Process.getEnv "ML_PLATFORM";
    22 val platform_is_windows = String.isSuffix "windows" platform;
    23 val platform_is_windows = String.isSuffix "windows" platform;
    23 val platform_is_64 = String.isPrefix "x86_64-" platform;
    24 val platform_is_64 = String.isPrefix "x86_64-" platform;
       
    25 val platform_is_arm = String.isPrefix "arm64-" platform;
    24 
    26 
    25 val platform_path =
    27 val platform_path =
    26   if platform_is_windows then
    28   if platform_is_windows then
    27     fn path =>
    29     fn path =>
    28       if String.isPrefix "/" path andalso not (String.isPrefix "//" path) then
    30       if String.isPrefix "/" path andalso not (String.isPrefix "//" path) then