blob: 6db518e88c7b21b15a799d59863455dd458ec157 (
plain)
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
|
let v1 : {|0, 1|} = 0
val test : bool -> {|0, 1|}
function test flag = if flag then 0 else 1
let v2 : range(0, 1) = test(true)
val add : forall 'a 'b. (atom('a), atom('b)) -> atom('a + 'b)
let v3 : {|3, 4|} = 3
let v4 : {'q, 'q in {0, 1}. atom('q + 3)} = v3
let v5 = add(test(true), 4)
let v6 : atom(4) = 4
val unit_fn : atom(4) -> unit
function unit_fn x : atom(4) = ()
val s_add : forall 'a. (atom('a), atom('a)) -> atom('a + 'a)
let v7 : {'k, 'k == 4. atom('k)} = 4
let v8 = s_add(v7, 4)
|