File: sml.actual

package info (click to toggle)
golang-github-alecthomas-chroma-v2 2.3.0-2~bpo11%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye-backports
  • size: 7,484 kB
  • sloc: xml: 30,358; python: 426; javascript: 79; sh: 36; makefile: 32
file content (44 lines) | stat: -rw-r--r-- 956 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
signature S = sig
    datatype t = Hoge | Fuga
end

structur A = struct
  structure B = struct
    structure C = struct
      type t = int * real * string * bool ref
    end
  end
end

functor F(X:sig type t; val compare: t * t -> order): S = struct
  datatype t = Hoge | Fuga
end

structure Main = struct
  local
      structure M = F(Int)
      open M
  in
    fun id x = x
    val bool = if true then false orelse false else true andalso true
    val int = ~1 + 1
    val real = 0.7 - 0.32E5 * E3~7
    val string = "a\a\b\t\n\v\f\r\^M\097\u00a1\"\\\
                 \"
    (* (* comments *) *)
    val ## = 1
    val |=| = 2
    infix ##
    infixr ##
    val op## = case Hoge of
                   Hoge => Fuga
                | Fuga => Hoge
    type s = {1: t, label: unit}
    type u = A.B.C.t
    val s = {1 = Hoge, label = ()}
    fun id x = x
    val rec id = fn x => x
    exception X and Y
    raise X handle X => (nil, [1], [1, 2])
  end
end