equal
deleted
inserted
replaced
7 signature ML_SYSTEM = |
7 signature ML_SYSTEM = |
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_path: string -> string |
13 val platform_path: string -> string |
13 val standard_path: string -> string |
14 val standard_path: string -> string |
14 end; |
15 end; |
15 |
16 |
16 structure ML_System: ML_SYSTEM = |
17 structure ML_System: ML_SYSTEM = |
17 struct |
18 struct |
18 |
19 |
19 val SOME name = OS.Process.getEnv "ML_SYSTEM"; |
20 val SOME name = OS.Process.getEnv "ML_SYSTEM"; |
20 val SOME platform = OS.Process.getEnv "ML_PLATFORM"; |
21 val SOME platform = OS.Process.getEnv "ML_PLATFORM"; |
21 val platform_is_windows = String.isSuffix "windows" platform; |
22 val platform_is_windows = String.isSuffix "windows" platform; |
|
23 val platform_is_64 = String.isPrefix "x86_64-" platform; |
22 |
24 |
23 val platform_path = |
25 val platform_path = |
24 if platform_is_windows then |
26 if platform_is_windows then |
25 fn path => |
27 fn path => |
26 if String.isPrefix "/" path andalso not (String.isPrefix "//" path) then |
28 if String.isPrefix "/" path andalso not (String.isPrefix "//" path) then |