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