File tree Expand file tree Collapse file tree 1 file changed +104
-0
lines changed Expand file tree Collapse file tree 1 file changed +104
-0
lines changed Original file line number Diff line number Diff line change
1
+ #IgnoreConcrete: true
2
+ #InferTasks: true
3
+ -- in.cue --
4
+ package p
5
+
6
+ import (
7
+ "list"
8
+ "tool/cli"
9
+ )
10
+
11
+ root: test: cli.Print & { text: "\(len(list.FlattenN(indir1, 10)))" }
12
+
13
+ indir1: [if len(indir2) > 0 { indir2 }]
14
+ indir2: [if len(indir3) > 0 { indir3 }]
15
+ indir3: [if len(indir4) > 0 { indir4 }]
16
+ indir4: indir5
17
+ indir5: indir6
18
+ indir6: indir7
19
+ indir7: [for i in list.Range(1,20,4) {
20
+ #pair & {
21
+ one: n: 0
22
+ two: n: i
23
+ }
24
+ }]
25
+
26
+ #pair: {
27
+ one: #unit & {
28
+ n: <25
29
+ }
30
+ two: #unit & {
31
+ n: >=one.n
32
+ if n == one.n {
33
+ n: <= one.n
34
+ }
35
+ }
36
+ if two.n > one.n {
37
+ one: n: 0
38
+ }
39
+ }
40
+
41
+ #unit: {
42
+ n: int
43
+ #padding: {in: <10, out: "0\(in)"} | {in: >=10, out: "\(in)"}
44
+ str: (#padding & {in: n}).out
45
+ }
46
+ -- out/run/errors --
47
+ -- out/run/t0 --
48
+ graph TD
49
+ t0("root.test [Ready]")
50
+
51
+ -- out/run/t1 --
52
+ graph TD
53
+ t0("root.test [Terminated]")
54
+
55
+ -- out/run/t1/value --
56
+ {
57
+ $id: "tool/cli.Print"
58
+ stdout: "foo"
59
+ text: "5"
60
+ }
61
+ -- out/run/t1/stats --
62
+ Leaks: 0
63
+ Freed: 262168
64
+ Reused: 262148
65
+ Allocs: 20
66
+ Retain: 352
67
+
68
+ Unifications: 187362
69
+ Conjuncts: 902602
70
+ Disjuncts: 262432
71
+ -- out/run/stats/totals --
72
+ Leaks: 0
73
+ Freed: 262168
74
+ Reused: 262148
75
+ Allocs: 20
76
+ Retain: 352
77
+
78
+ Unifications: 187362
79
+ Conjuncts: 902602
80
+ Disjuncts: 262432
81
+ -- out/run/t2 --
82
+ graph TD
83
+ t0("root.prepare [Terminated]")
84
+ t1("root.run [Terminated]")
85
+ t1-->t0
86
+
87
+ -- out/run/t2/value --
88
+ {
89
+ $id: "run"
90
+ stdout: "foo"
91
+ env: {
92
+ input: "foo"
93
+ }
94
+ }
95
+ -- out/run/t2/stats --
96
+ Leaks: 0
97
+ Freed: 12
98
+ Reused: 12
99
+ Allocs: 0
100
+ Retain: 0
101
+
102
+ Unifications: 12
103
+ Conjuncts: 20
104
+ Disjuncts: 12
You can’t perform that action at this time.
0 commit comments