Debian Codegraph @

doc/guide/src/MLtonWord.adoc

raw
1 = MLtonWord
2
3 [source,sml]
4 ----
5 signature MLTON_WORD =
6 sig
7 type t
8
9 val bswap: t -> t
10 val rol: t * word -> t
11 val ror: t * word -> t
12 end
13 ----
14
15 * `type t`
16 +
17 the type of words. For `MLton.LargeWord` this is `LargeWord.word`,
18 for `MLton.Word` this is `Word.word`, for `MLton.Word8` this is
19 `Word8.word`, for `MLton.Word16` this is `Word16.word`, for
20 `MLton.Word32` this is `Word32.word`, for `MLton.Word64` this is
21 `Word64.word`.
22
23 * `bswap w`
24 +
25 byte swap.
26
27 * `rol (w, w')`
28 +
29 rotates left (circular).
30
31 * `ror (w, w')`
32 +
33 rotates right (circular).