Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | MLtonPlatform |
2 | ============= | |
3 | ||
4 | [source,sml] | |
5 | ---- | |
6 | signature MLTON_PLATFORM = | |
7 | sig | |
8 | structure Arch: | |
9 | sig | |
10 | datatype t = Alpha | AMD64 | ARM | ARM64 | HPPA | IA64 | m68k | |
11 | | MIPS | PowerPC | PowerPC64 | S390 | Sparc | X86 | |
12 | ||
13 | val fromString: string -> t option | |
14 | val host: t | |
15 | val toString: t -> string | |
16 | end | |
17 | ||
18 | structure OS: | |
19 | sig | |
20 | datatype t = AIX | Cygwin | Darwin | FreeBSD | Hurd | HPUX | |
21 | | Linux | MinGW | NetBSD | OpenBSD | Solaris | |
22 | ||
23 | val fromString: string -> t option | |
24 | val host: t | |
25 | val toString: t -> string | |
26 | end | |
27 | end | |
28 | ---- | |
29 | ||
30 | * `datatype Arch.t` | |
31 | + | |
32 | processor architectures | |
33 | ||
34 | * `Arch.fromString a` | |
35 | + | |
36 | converts from string to architecture. Case insensitive. | |
37 | ||
38 | * `Arch.host` | |
39 | + | |
40 | the architecture for which the program is compiled. | |
41 | ||
42 | * `Arch.toString` | |
43 | + | |
44 | string for architecture. | |
45 | ||
46 | * `datatype OS.t` | |
47 | + | |
48 | operating systems | |
49 | ||
50 | * `OS.fromString` | |
51 | + | |
52 | converts from string to operating system. Case insensitive. | |
53 | ||
54 | * `OS.host` | |
55 | + | |
56 | the operating system for which the program is compiled. | |
57 | ||
58 | * `OS.toString` | |
59 | + | |
60 | string for operating system. |