...
1-- in.cue --
2_Q: [{pos: 0}, {pos: 1}]
3
4a: [rn=string]: _Q[0:len(a[rn])]
5a: ben: [{}]
6
7b: [rn=string]: _Q[0:1]
8b: ben: [{}]
9
10c: [rn=string]: [...{l: len(a[rn])}]
11c: ben: [{}]
12
13#d: [rn=string]: [...{pos: uint}] & _Q[0:len(#d[rn])]
14#d: ben: [{}]
15
16d: #d
17
18e: [rn=string]: _Q[0 : len(a[rn])+1]
19e: ben: [{}, ...]
20
21f: [rn=string]: _Q[0 : len(a[rn])+1]
22f: ben: [{}]
23
24g: [rn=string]: _Q[0:len(a[rn])]
25g: ben: [{}, {}]
26-- out/eval/stats --
27Leaks: 0
28Freed: 43
29Reused: 38
30Allocs: 5
31Retain: 0
32
33Unifications: 43
34Conjuncts: 83
35Disjuncts: 45
36-- out/evalalpha --
37Errors:
38f.ben: incompatible list lengths (1 and 2):
39 ./in.cue:20:17
40g.ben: incompatible list lengths (1 and 2):
41 ./in.cue:23:17
42
43Result:
44(_|_){
45 // [eval]
46 _Q: (#list){
47 0: (struct){
48 pos: (int){ 0 }
49 }
50 1: (struct){
51 pos: (int){ 1 }
52 }
53 }
54 a: (struct){
55 ben: (#list){
56 0: (struct){
57 pos: (int){ 0 }
58 }
59 }
60 }
61 b: (struct){
62 ben: (#list){
63 0: (struct){
64 pos: (int){ 0 }
65 }
66 }
67 }
68 c: (struct){
69 ben: (#list){
70 0: (struct){
71 l: (int){ 1 }
72 }
73 }
74 }
75 #d: (#struct){
76 ben: (#list){
77 0: (#struct){
78 pos: (int){ 0 }
79 }
80 }
81 }
82 d: (#struct){
83 ben: (#list){
84 0: (#struct){
85 pos: (int){ 0 }
86 }
87 }
88 }
89 e: (struct){
90 ben: (#list){
91 0: (struct){
92 pos: (int){ 0 }
93 }
94 1: (struct){
95 pos: (int){ 1 }
96 }
97 }
98 }
99 f: (_|_){
100 // [eval]
101 ben: (_|_){
102 // [eval] f.ben: incompatible list lengths (1 and 2):
103 // ./in.cue:20:17
104 0: (struct){
105 }
106 }
107 }
108 g: (_|_){
109 // [eval]
110 ben: (_|_){
111 // [eval] g.ben: incompatible list lengths (1 and 2):
112 // ./in.cue:23:17
113 0: (struct){
114 }
115 1: (struct){
116 }
117 }
118 }
119}
120-- diff/-out/evalalpha<==>+out/eval --
121diff old new
122--- old
123+++ new
124@@ -1,6 +1,8 @@
125 Errors:
126-f.ben: incompatible list lengths (1 and 2)
127-g.ben: incompatible list lengths (1 and 2)
128+f.ben: incompatible list lengths (1 and 2):
129+ ./in.cue:20:17
130+g.ben: incompatible list lengths (1 and 2):
131+ ./in.cue:23:17
132
133 Result:
134 (_|_){
135@@ -61,12 +63,9 @@
136 f: (_|_){
137 // [eval]
138 ben: (_|_){
139- // [eval] f.ben: incompatible list lengths (1 and 2)
140- 0: (struct){
141- pos: (int){ 0 }
142- }
143- 1: (struct){
144- pos: (int){ 1 }
145+ // [eval] f.ben: incompatible list lengths (1 and 2):
146+ // ./in.cue:20:17
147+ 0: (struct){
148 }
149 }
150 }
151@@ -73,9 +72,9 @@
152 g: (_|_){
153 // [eval]
154 ben: (_|_){
155- // [eval] g.ben: incompatible list lengths (1 and 2)
156- 0: (struct){
157- pos: (int){ 0 }
158+ // [eval] g.ben: incompatible list lengths (1 and 2):
159+ // ./in.cue:23:17
160+ 0: (struct){
161 }
162 1: (struct){
163 }
164-- diff/todo/p2 --
165error path moved
166-- out/eval --
167Errors:
168f.ben: incompatible list lengths (1 and 2)
169g.ben: incompatible list lengths (1 and 2)
170
171Result:
172(_|_){
173 // [eval]
174 _Q: (#list){
175 0: (struct){
176 pos: (int){ 0 }
177 }
178 1: (struct){
179 pos: (int){ 1 }
180 }
181 }
182 a: (struct){
183 ben: (#list){
184 0: (struct){
185 pos: (int){ 0 }
186 }
187 }
188 }
189 b: (struct){
190 ben: (#list){
191 0: (struct){
192 pos: (int){ 0 }
193 }
194 }
195 }
196 c: (struct){
197 ben: (#list){
198 0: (struct){
199 l: (int){ 1 }
200 }
201 }
202 }
203 #d: (#struct){
204 ben: (#list){
205 0: (#struct){
206 pos: (int){ 0 }
207 }
208 }
209 }
210 d: (#struct){
211 ben: (#list){
212 0: (#struct){
213 pos: (int){ 0 }
214 }
215 }
216 }
217 e: (struct){
218 ben: (#list){
219 0: (struct){
220 pos: (int){ 0 }
221 }
222 1: (struct){
223 pos: (int){ 1 }
224 }
225 }
226 }
227 f: (_|_){
228 // [eval]
229 ben: (_|_){
230 // [eval] f.ben: incompatible list lengths (1 and 2)
231 0: (struct){
232 pos: (int){ 0 }
233 }
234 1: (struct){
235 pos: (int){ 1 }
236 }
237 }
238 }
239 g: (_|_){
240 // [eval]
241 ben: (_|_){
242 // [eval] g.ben: incompatible list lengths (1 and 2)
243 0: (struct){
244 pos: (int){ 0 }
245 }
246 1: (struct){
247 }
248 }
249 }
250}
251-- out/compile --
252--- in.cue
253{
254 _Q: [
255 {
256 pos: 0
257 },
258 {
259 pos: 1
260 },
261 ]
262 a: {
263 [string]: 〈1;_Q〉[0:len(〈1;a〉[〈0;-〉])]
264 }
265 a: {
266 ben: [
267 {},
268 ]
269 }
270 b: {
271 [string]: 〈1;_Q〉[0:1]
272 }
273 b: {
274 ben: [
275 {},
276 ]
277 }
278 c: {
279 [string]: [
280 ...{
281 l: len(〈3;a〉[〈2;-〉])
282 },
283 ]
284 }
285 c: {
286 ben: [
287 {},
288 ]
289 }
290 #d: {
291 [string]: ([
292 ...{
293 pos: &(int, >=0)
294 },
295 ] & 〈1;_Q〉[0:len(〈1;#d〉[〈0;-〉])])
296 }
297 #d: {
298 ben: [
299 {},
300 ]
301 }
302 d: 〈0;#d〉
303 e: {
304 [string]: 〈1;_Q〉[0:(len(〈1;a〉[〈0;-〉]) + 1)]
305 }
306 e: {
307 ben: [
308 {},
309 ...,
310 ]
311 }
312 f: {
313 [string]: 〈1;_Q〉[0:(len(〈1;a〉[〈0;-〉]) + 1)]
314 }
315 f: {
316 ben: [
317 {},
318 ]
319 }
320 g: {
321 [string]: 〈1;_Q〉[0:len(〈1;a〉[〈0;-〉])]
322 }
323 g: {
324 ben: [
325 {},
326 {},
327 ]
328 }
329}
View as plain text