Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / MLtonPlatform.adoc
CommitLineData
7f918cf1
CE
1MLtonPlatform
2=============
3
4[source,sml]
5----
6signature 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+
32processor architectures
33
34* `Arch.fromString a`
35+
36converts from string to architecture. Case insensitive.
37
38* `Arch.host`
39+
40the architecture for which the program is compiled.
41
42* `Arch.toString`
43+
44string for architecture.
45
46* `datatype OS.t`
47+
48operating systems
49
50* `OS.fromString`
51+
52converts from string to operating system. Case insensitive.
53
54* `OS.host`
55+
56the operating system for which the program is compiled.
57
58* `OS.toString`
59+
60string for operating system.