cuelang.org/go@v0.13.0/cue/testdata/cycle/structural.txtar (about)

     1  -- in.cue --
     2  import "list"
     3  
     4  a1: {
     5  	f: [f]
     6  }
     7  
     8  a2: {
     9  	f: f
    10  }
    11  
    12  a3: {
    13  	f: {g: f}
    14  }
    15  
    16  a4: {
    17  	a: [a | int]
    18  }
    19  
    20  a5: {
    21  	a: b: a | int
    22  }
    23  
    24  a6: {
    25  	a: a | int
    26  }
    27  
    28  a7: {
    29  	a: c.x
    30  	b: {
    31  		x: c
    32  		y: "foo"
    33  	}
    34  	c: {
    35  		x: b.y
    36  		y: 3
    37  	}
    38  }
    39  
    40  b1: {
    41  	b: a & [1]
    42  	a: [a | int]
    43  }
    44  
    45  b2: {
    46  	a: [a | int]
    47  	b: a & [1]
    48  }
    49  
    50  b3: {
    51  	x: a: [a | int]
    52  	b: x & {a: [1]}
    53  }
    54  
    55  b4: {
    56  	b: x.y & [1]
    57  	x: y: [y]
    58  }
    59  
    60  // Ensure that the cycle error is not blindly copied to a referring field,
    61  // as the cycle may not persist.
    62  b4: cond1: {
    63  	b: x.y & { _z: false, [1] }
    64  	x: y: {
    65  		_z: *true | bool
    66  		if _z {
    67  			[y]
    68  		}
    69  	}
    70  }
    71  
    72  // This reports a structural cycle at b4.cond2.b, because the value it refers
    73  // has a structural cycle. Technically, this is incorrect, as the cycle
    74  // really only occurs in b4.cond2.x.y. But since structural cycles are
    75  // permanent, the entire configuration is invalidated, so the spurious
    76  // additional cycle is merely cosmetic. By most logical standards, one can prove
    77  // any fact from a contradiction. So assuming that, this is not incorrect.
    78  // TODO: fix this cosmetic blemish.
    79  b4: cond2: {
    80  	x: y: {
    81  		_z: *true | bool
    82  		if _z {
    83  			[y]
    84  		}
    85  	}
    86  	b: x.y & { _z: false, [1] }
    87  }
    88  
    89  b5: {
    90  	b: x.y & {a: [1]}
    91  	x: y: a: [a | int]
    92  }
    93  
    94  b6: {
    95  	b: x & {a: [1]}
    96  	x: a: [a]
    97  }
    98  
    99  b7: {
   100  	b: a & [[1]]
   101  	a: [a]
   102  }
   103  
   104  // Issue #555
   105  b8: {
   106  	x: a
   107  	a: f: b
   108  	b: a | string
   109  }
   110  
   111  // Issue #555
   112  b9: {
   113  	#a: string | #b | #ref
   114  	#b: {
   115  		c: [#a, #a, #a]
   116  	}
   117  	#ref: ref: string
   118  	x: #b | #ref
   119  }
   120  
   121  // Issue #534
   122  // TODO: the resolution here is arguably incorrect: c should be
   123  // 		d: string | { b: string }
   124  // However, this is not the end of the world, as the disjunction is preserved
   125  // under the hood and still unifies with extended structure.
   126  b10: {
   127  	a: close({
   128  		b: string | a | c
   129  	})
   130  	c: close({
   131  		d: string | a
   132  	})
   133  
   134  	d: d: b: string
   135  }
   136  
   137  // Issue #509 -- with comprehension
   138  b11: {
   139  	#list: {
   140  		tail: #list | *null
   141  		if tail != null {
   142  		}
   143  	}
   144  }
   145  
   146  // Issue #509 -- with comprehension
   147  b12: {
   148  	#list: {
   149  		V=value: int
   150  		T=tail:  #list | *null
   151  		if T != null {
   152  			sum: V + T.sum
   153  		}
   154  		if T == null {
   155  			sum: V
   156  		}
   157  	}
   158  
   159  	list1: #list
   160  	list1: {
   161  		value: 1
   162  		tail: {
   163  			value: 2
   164  			tail: {
   165  				value: 3
   166  				tail: {
   167  					value: 4
   168  				}
   169  			}
   170  		}
   171  	}
   172  }
   173  
   174  // More trigger happy on stack overflows.
   175  b12b: {
   176  	#list: {
   177  		tail: #list
   178  
   179  		if tail != null {
   180  			sum: tail.sum
   181  		}
   182  	}
   183  
   184  	list1: #list
   185  	list1: {
   186  		tail: {
   187  			tail: {
   188  			}
   189  		}
   190  	}
   191  }
   192  
   193  // Issue #587
   194  b13: root: a: [for x in root {x}]
   195  
   196  // Issue #587
   197  // TODO: this should probably be okay if we allow shallow evaluation of
   198  // comprehension sources. See #1881.
   199  b14: {
   200  	root: {
   201  		a: [...int]
   202  
   203  		for x in a {
   204  			"\(x)": {}
   205  		}
   206  
   207  		b: [for x in root {x}]
   208  	}
   209  }
   210  
   211  // This is okay
   212  // Issue #587
   213  b15: root: a: {for x in root {x}}
   214  
   215  // Issue #502 -- unused bulk constraints are not cyclic
   216  p1: {
   217  	#T: {
   218  		a: [string]: link: #T
   219  	}
   220  
   221  	a: #T & {
   222  		a: one: link: a: two: {}
   223  	}
   224  }
   225  
   226  // Issue #502 -- but they are if it is invoked within the struct.
   227  p2: {
   228  	#T: {
   229  		a: [string]: link: #T
   230  		a: b: {}
   231  	}
   232  
   233  	a: #T & {
   234  		a: one: link: a: two: {}
   235  	}
   236  }
   237  
   238  // Issue #502 -- or added later.
   239  p3: {
   240  	#S: #T: {
   241  		a: [string]: link: #T
   242  	}
   243  
   244  	#U: {
   245  		#S
   246  		#T: a: b: {}
   247  	}
   248  
   249  	a: #U.#T & {
   250  		a: one: link: a: two: {}
   251  	}
   252  }
   253  
   254  // Issue #502 -- unused bulk constraints are not cyclic
   255  p4: {
   256  	#T: {
   257  		a: [...{link: #T}]
   258  	}
   259  
   260  	a: #T & {
   261  		a: [{link: a: [{}]}]
   262  	}
   263  }
   264  
   265  // Issue #502 -- but they are if it is invoked within the struct.
   266  p5: {
   267  	#T: {
   268  		a: [...{link: #T}]
   269  		a: [{}]
   270  	}
   271  
   272  	a: #T & {
   273  		a: [{link: a: [{}]}]
   274  	}
   275  }
   276  
   277  // Issue #502 -- or added later.
   278  p6: {
   279  	#S: #T: {
   280  		a: [...{link: #T}]
   281  	}
   282  
   283  	#U: {
   284  		#S
   285  		#T: a: [{}]
   286  	}
   287  
   288  	a: #U.#T & {
   289  		a: [{link: a: [{}]}]
   290  	}
   291  }
   292  
   293  c1: {
   294  	a: {
   295  		b: {}
   296  		c: a & b
   297  	}
   298  }
   299  
   300  // indirection
   301  d1: {
   302  	a: b: c: d: {h: int, t: r}
   303  	r: a.b
   304  
   305  	x: a.b.c
   306  }
   307  
   308  d2: {
   309  	x: a.b.c
   310  
   311  	r: a.b
   312  	a: b: c: d: {h: int, t: r}
   313  }
   314  
   315  d3: {
   316  	config: {
   317  		a: b: c: indirect
   318  		indirect: [a.b, null][i]
   319  		i:        int | *1
   320  	}
   321  	x: config & {i: 0}
   322  }
   323  
   324  // Ensure that the cycles here fail early.
   325  // TODO: they can still be shorter.
   326  shortPathFail: _
   327  
   328  shortPathFail: doubleRef: {
   329  	// Avoid this: the first #List reference is different from the second, so
   330  	// the second #List reference counts as a first occurrence, causing the
   331  	// result to be longer than perhaps expected.
   332  	a: #List
   333  	#List: Next: #List | *null
   334  }
   335  
   336  shortPathFail: elipsis: {
   337  	// Avoid this: the elipsis causes `_` to be mixed in with the #Foo
   338  	// reference, causing the first cycle to be discounted.
   339  	t1: {
   340  		#Foo: ref:  null | #Foo
   341  		#Foo: { ... }
   342  	}
   343  	t2: {
   344  		Foo: ref:  Foo
   345  		Foo: {...}
   346  	}
   347  }
   348  
   349  patternFail: issue2374: {
   350  	r=[string]: {b: r}
   351  	a: {r: 0}
   352  }
   353  
   354  shortPathFail: comprehension: {
   355  	#list: {
   356  		tail: #list | *null
   357  		if tail != null {
   358  		}
   359  	}
   360  }
   361  
   362  withLetFail: {
   363  	schema: next:  _schema_1
   364  	let _schema_1 = schema
   365  }
   366  
   367  fieldsSumInfinite: issue3310: {
   368  	cheeseburger: 3.00
   369  	fries:        2.00
   370  	sprite:       1.00
   371  
   372  	total: list.Sum([for _, v in issue3310 {v}])
   373  }
   374  
   375  listOptOK: {
   376  	list: {
   377  		head: int
   378  		tail?: list
   379  	}
   380  	a: list & {head: 3, tail: head: 2}
   381  }
   382  
   383  // The cyclic definitions below used to work OK on old versions of evalv2,
   384  // and broke around the release of CUE v0.6.0. evalv3 fixes this again.
   385  // It should succeed, given that the optional field breaks the cycle.
   386  issue2545: {
   387  	#A: {
   388  		B?: #B
   389  	}
   390  	#B: {
   391  		A: #A
   392  	}
   393  }
   394  
   395  // combining structural with reference cycles
   396  e1: {
   397  	a: a
   398  	a: c: a
   399  
   400  	b: c: b
   401  	b: b
   402  }
   403  
   404  e2: {
   405  	a: {a}
   406  	a: c: a
   407  
   408  	b: c: b
   409  	b: {b}
   410  }
   411  
   412  e3: {
   413  	a: [a]
   414  	a: c: a
   415  
   416  	b: [b]
   417  	b: c: b
   418  }
   419  
   420  e4: {
   421  	a: [a | {}]
   422  	a: [[{c: 1}]]
   423  
   424  	b: [[{c: 1}]]
   425  	b: [b | {}]
   426  }
   427  
   428  e5: {
   429  	a: c: a | int
   430  	a: a | int
   431  
   432  	b: b | int
   433  	b: c: b | int
   434  }
   435  
   436  // validating values
   437  nestedList: {
   438  	v1e: {
   439  		x: [x | int, 1]
   440  		y: x & [[[2], 1], 1]
   441  	}
   442  
   443  	v2e: {
   444  		y: x & [[[2], 1], 1]
   445  		x: [x | int, 1]
   446  	}
   447  
   448  	v1: {
   449  		x: [x | int, 1]
   450  		y: x & [[[2, 1], 1], 1]
   451  	}
   452  
   453  	v2: {
   454  		y: x & [[[2, 1], 1], 1]
   455  		x: [x | int, 1]
   456  	}
   457  }
   458  
   459  v3: {
   460  	list: {
   461  		head: int
   462  		tail: list | null
   463  	}
   464  
   465  	myList: list
   466  	myList: {
   467  		head: 2
   468  		tail: {
   469  			head: 3
   470  			tail: {
   471  				head: 4
   472  			}
   473  		}
   474  	}
   475  }
   476  
   477  v4: {
   478  	list: {
   479  		head: int
   480  		tail: list | 1
   481  	}
   482  
   483  	myList: list
   484  	myList: {
   485  		head: 2
   486  		tail: head: 3
   487  	}
   488  }
   489  
   490  v5: {
   491  	list: {
   492  		head: int
   493  		tail: list | {}
   494  	}
   495  
   496  	myList: list
   497  	myList: {
   498  		head: 2
   499  		tail: head: 3
   500  	}
   501  }
   502  
   503  // Example from "The Logic of Type Feature Structures" (Bob Carpenter)/
   504  z1: {
   505  	y: {
   506  		f: h: g
   507  		g: _
   508  	}
   509  	x: {
   510  		f: _
   511  		g: f
   512  	}
   513  	z: x & y
   514  }
   515  
   516  // Cross references. Here there is no cycle, but the repeated instantiations
   517  // of T will cause, in turn, cause repeated resolution of `x`. The algorithm
   518  // should not identify these as cyclic references. Instead, it should be
   519  // noted that the reference is each time referring to new content.
   520  // Issue #754
   521  crossRefNoCycle: t1: {
   522  	T: {
   523  		x: _
   524  		y: x
   525  	}
   526  	C: { x: T } & T
   527  }
   528  
   529  crossRefNoCycle: t2: {
   530  	T: {
   531  		x: _
   532  		y: x
   533  	}
   534  	C: T & { x: T }
   535  }
   536  
   537  crossRefNoCycle: t3: {
   538  	T: {
   539  		x: _
   540  		y: x
   541  		z: y
   542  	}
   543  	C: T & { x: T }
   544  }
   545  
   546  crossRefNoCycle: t4: {
   547  	T: {
   548  		x: _
   549  		y: x
   550  		z: y
   551  	}
   552  	C: T & { x: T & { x: T } }
   553  }
   554  
   555  crossRefNoCycle: t5: {
   556  	T: X={
   557  		y: X.x
   558  	}
   559  	C: T & { x: T  }
   560  }
   561  
   562  // Ensure these are NOT treated as structural errors.
   563  
   564  n1: a: b: int
   565  n2: n1 & {a: n1}
   566  n3: n1 & {n1}
   567  n4: n1 & {x: n1 & {y: n1 & {z: int}}}
   568  -- edge.cue --
   569  resolveToAncestor: {
   570  	t1: X: {
   571  		a: b.a
   572  		b: X
   573  	}
   574  	t2: X: {
   575  		b: X
   576  		a: b.a
   577  	}
   578  }
   579  -- out/evalalpha/stats --
   580  Leaks:  847
   581  Freed:  0
   582  Reused: 0
   583  Allocs: 847
   584  Retain: 0
   585  
   586  Unifications: 581
   587  Conjuncts:    1044
   588  Disjuncts:    149
   589  
   590  CloseIDElems: 276
   591  NumCloseIDs: 175
   592  -- diff/-out/evalalpha/stats<==>+out/eval/stats --
   593  diff old new
   594  --- old
   595  +++ new
   596  @@ -1,9 +1,12 @@
   597  -Leaks:  16
   598  -Freed:  843
   599  -Reused: 831
   600  -Allocs: 28
   601  -Retain: 68
   602  -
   603  -Unifications: 673
   604  -Conjuncts:    1299
   605  -Disjuncts:    896
   606  +Leaks:  847
   607  +Freed:  0
   608  +Reused: 0
   609  +Allocs: 847
   610  +Retain: 0
   611  +
   612  +Unifications: 581
   613  +Conjuncts:    1044
   614  +Disjuncts:    149
   615  +
   616  +CloseIDElems: 276
   617  +NumCloseIDs: 175
   618  -- out/eval/stats --
   619  Leaks:  16
   620  Freed:  843
   621  Reused: 831
   622  Allocs: 28
   623  Retain: 68
   624  
   625  Unifications: 673
   626  Conjuncts:    1299
   627  Disjuncts:    896
   628  -- out/evalalpha --
   629  Errors:
   630  a1.f.0: structural cycle
   631  a3.f.g: structural cycle
   632  b12b.#list.tail: structural cycle
   633  b13.root.a.0.0: structural cycle
   634  b14.root.b.1.1: structural cycle
   635  b4.b.0: conflicting values 1 and [y] (mismatched types int and list):
   636      ./in.cue:55:12
   637      ./in.cue:56:8
   638  b4.cond1.x.y.0: structural cycle
   639  b4.cond2.x.y.0: structural cycle
   640  b4.x.y.0: structural cycle
   641  b6.b.a.0: conflicting values 1 and [1] (mismatched types int and list):
   642      ./in.cue:94:13
   643      ./in.cue:94:14
   644  b6.x.a.0: structural cycle
   645  b7.a.0: structural cycle
   646  b7.b.0.0: conflicting values 1 and [a] (mismatched types int and list):
   647      ./in.cue:99:11
   648      ./in.cue:100:5
   649  c1.a.c.c: structural cycle
   650  d1.r: structural cycle
   651  d2.a.b.c.d.t: structural cycle
   652  d3.x.indirect: structural cycle
   653  e1.a.c: structural cycle
   654  e1.b.c: structural cycle
   655  e2.a.c: structural cycle
   656  e2.b.c: structural cycle
   657  e3.a: conflicting values [a] and {c:a} (mismatched types list and struct):
   658      ./in.cue:412:5
   659      ./in.cue:413:5
   660  e3.b: conflicting values [b] and {c:b} (mismatched types list and struct):
   661      ./in.cue:415:5
   662      ./in.cue:416:5
   663  e4.a.0: 4 errors in empty disjunction:
   664  e4.a.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
   665      ./in.cue:420:10
   666      ./in.cue:421:6
   667  e4.a.0.0: 2 errors in empty disjunction:
   668  e4.a.0.0: conflicting values [{c:1}] and {c:1} (mismatched types list and struct):
   669      ./in.cue:421:6
   670      ./in.cue:421:7
   671  e4.a.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
   672      ./in.cue:420:10
   673      ./in.cue:421:6
   674  e4.b.0: 4 errors in empty disjunction:
   675  e4.b.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
   676      ./in.cue:423:6
   677      ./in.cue:424:10
   678  e4.b.0.0: 2 errors in empty disjunction:
   679  e4.b.0.0: conflicting values [{c:1}] and {c:1} (mismatched types list and struct):
   680      ./in.cue:423:6
   681      ./in.cue:423:7
   682  e4.b.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
   683      ./in.cue:423:6
   684      ./in.cue:424:10
   685  issue2545.#B.A: structural cycle
   686  nestedList.v1e.y.0: 4 errors in empty disjunction:
   687  nestedList.v1e.y.0: conflicting values [[2],1] and int (mismatched types list and int):
   688      ./in.cue:438:11
   689      ./in.cue:439:11
   690  nestedList.v1e.y.0.0: 2 errors in empty disjunction:
   691  nestedList.v1e.y.0.0: conflicting values [2] and int (mismatched types list and int):
   692      ./in.cue:438:11
   693      ./in.cue:439:12
   694  nestedList.v2e.y.0: 4 errors in empty disjunction:
   695  nestedList.v2e.y.0: conflicting values [[2],1] and int (mismatched types list and int):
   696      ./in.cue:443:11
   697      ./in.cue:444:11
   698  nestedList.v2e.y.0.0: 2 errors in empty disjunction:
   699  nestedList.v2e.y.0.0: conflicting values [2] and int (mismatched types list and int):
   700      ./in.cue:443:12
   701      ./in.cue:444:11
   702  p2.#T.a.b.link: structural cycle
   703  p3.#U.#T.a.b.link: structural cycle
   704  p5.#T.a.0.link: structural cycle
   705  p6.#U.#T.a.0.link: structural cycle
   706  patternFail.issue2374.a.b: structural cycle
   707  resolveToAncestor.t1.X.b: structural cycle
   708  resolveToAncestor.t2.X.b: structural cycle
   709  shortPathFail.elipsis.t2.Foo.ref: structural cycle
   710  withLetFail.schema.next: structural cycle
   711  z1.z.g.h: structural cycle
   712  3: structural cycle:
   713      ./in.cue:371:9
   714  nestedList.v1e.y.0.0: incompatible list lengths (1 and 2):
   715      ./in.cue:438:6
   716  nestedList.v2e.y.0.0: incompatible list lengths (1 and 2):
   717      ./in.cue:444:6
   718  
   719  Result:
   720  (_|_){
   721    // [eval]
   722    resolveToAncestor: (_|_){
   723      // [structural cycle]
   724      t1: (_|_){
   725        // [structural cycle]
   726        X: (_|_){
   727          // [structural cycle]
   728          a: (_){ _ }
   729          b: (_|_){
   730            // [structural cycle] resolveToAncestor.t1.X.b: structural cycle
   731          }
   732        }
   733      }
   734      t2: (_|_){
   735        // [structural cycle]
   736        X: (_|_){
   737          // [structural cycle]
   738          b: (_|_){
   739            // [structural cycle] resolveToAncestor.t2.X.b: structural cycle
   740          }
   741          a: (_|_){
   742            // [structural cycle] resolveToAncestor.t2.X.b: structural cycle
   743          }
   744        }
   745      }
   746    }
   747    a1: (_|_){
   748      // [structural cycle]
   749      f: (_|_){
   750        // [structural cycle]
   751        0: (_|_){
   752          // [structural cycle] a1.f.0: structural cycle
   753        }
   754      }
   755    }
   756    a2: (struct){
   757      f: (_){ _ }
   758    }
   759    a3: (_|_){
   760      // [structural cycle]
   761      f: (_|_){
   762        // [structural cycle]
   763        g: (_|_){
   764          // [structural cycle] a3.f.g: structural cycle
   765        }
   766      }
   767    }
   768    a4: (struct){
   769      a: (#list){
   770        0: (int){ int }
   771      }
   772    }
   773    a5: (struct){
   774      a: (struct){
   775        b: (int){ int }
   776      }
   777    }
   778    a6: (struct){
   779      a: (_){ |((_){ _ }, (int){ int }) }
   780    }
   781    a7: (struct){
   782      a: (string){ "foo" }
   783      b: (struct){
   784        x: ~(a7.c)
   785        y: (string){ "foo" }
   786      }
   787      c: (struct){
   788        x: (string){ "foo" }
   789        y: (int){ 3 }
   790      }
   791    }
   792    b1: (struct){
   793      b: (#list){
   794        0: (int){ 1 }
   795      }
   796      a: (#list){
   797        0: (int){ int }
   798      }
   799    }
   800    b2: (struct){
   801      a: (#list){
   802        0: (int){ int }
   803      }
   804      b: (#list){
   805        0: (int){ 1 }
   806      }
   807    }
   808    b3: (struct){
   809      x: (struct){
   810        a: (#list){
   811          0: (int){ int }
   812        }
   813      }
   814      b: (struct){
   815        a: (#list){
   816          0: (int){ 1 }
   817        }
   818      }
   819    }
   820    b4: (_|_){
   821      // [eval]
   822      b: (_|_){
   823        // [eval]
   824        0: (_|_){
   825          // [eval] b4.b.0: conflicting values 1 and [y] (mismatched types int and list):
   826          //     ./in.cue:55:12
   827          //     ./in.cue:56:8
   828          0: (_|_){// 〈1;y〉
   829          }
   830        }
   831      }
   832      x: (_|_){
   833        // [structural cycle]
   834        y: (_|_){
   835          // [structural cycle]
   836          0: (_|_){
   837            // [structural cycle] b4.x.y.0: structural cycle
   838          }
   839        }
   840      }
   841      cond1: (_|_){
   842        // [structural cycle]
   843        b: (#list){
   844          _z: (bool){ false }
   845          0: (int){ 1 }
   846        }
   847        x: (_|_){
   848          // [structural cycle]
   849          y: (_|_){
   850            // [structural cycle]
   851            _z: (bool){ |(*(bool){ true }, (bool){ bool }) }
   852            0: (_|_){
   853              // [structural cycle] b4.cond1.x.y.0: structural cycle
   854            }
   855          }
   856        }
   857      }
   858      cond2: (_|_){
   859        // [structural cycle]
   860        x: (_|_){
   861          // [structural cycle]
   862          y: (_|_){
   863            // [structural cycle]
   864            _z: (bool){ |(*(bool){ true }, (bool){ bool }) }
   865            0: (_|_){
   866              // [structural cycle] b4.cond2.x.y.0: structural cycle
   867            }
   868          }
   869        }
   870        b: (_|_){
   871          // [structural cycle] b4.cond2.x.y.0: structural cycle
   872        }
   873      }
   874    }
   875    b5: (struct){
   876      b: (struct){
   877        a: (#list){
   878          0: (int){ 1 }
   879        }
   880      }
   881      x: (struct){
   882        y: (struct){
   883          a: (#list){
   884            0: (int){ int }
   885          }
   886        }
   887      }
   888    }
   889    b6: (_|_){
   890      // [eval]
   891      b: (_|_){
   892        // [eval]
   893        a: (_|_){
   894          // [eval]
   895          0: (_|_){
   896            // [eval] b6.b.a.0: conflicting values 1 and [1] (mismatched types int and list):
   897            //     ./in.cue:94:13
   898            //     ./in.cue:94:14
   899            0: (_|_){// 1 & 〈1;a〉
   900            }
   901          }
   902        }
   903      }
   904      x: (_|_){
   905        // [structural cycle]
   906        a: (_|_){
   907          // [structural cycle]
   908          0: (_|_){
   909            // [structural cycle] b6.x.a.0: structural cycle
   910          }
   911        }
   912      }
   913    }
   914    b7: (_|_){
   915      // [eval]
   916      b: (_|_){
   917        // [eval]
   918        0: (_|_){
   919          // [eval]
   920          0: (_|_){
   921            // [eval] b7.b.0.0: conflicting values 1 and [a] (mismatched types int and list):
   922            //     ./in.cue:99:11
   923            //     ./in.cue:100:5
   924            0: (_|_){// 〈1;a〉
   925            }
   926          }
   927        }
   928      }
   929      a: (_|_){
   930        // [structural cycle]
   931        0: (_|_){
   932          // [structural cycle] b7.a.0: structural cycle
   933        }
   934      }
   935    }
   936    b8: (struct){
   937      x: ~(b8.a)
   938      a: (struct){
   939        f: (string){ string }
   940      }
   941      b: (string){ string }
   942    }
   943    b9: (struct){
   944      #a: ((string|struct)){ |((string){ string }, (#struct){
   945          ref: (string){ string }
   946        }) }
   947      #b: (#struct){
   948        c: (#list){
   949          0: ((string|struct)){ |((string){ string }, (#struct){
   950              ref: (string){ string }
   951            }) }
   952          1: ((string|struct)){ |((string){ string }, (#struct){
   953              ref: (string){ string }
   954            }) }
   955          2: ((string|struct)){ |((string){ string }, (#struct){
   956              ref: (string){ string }
   957            }) }
   958        }
   959      }
   960      #ref: (#struct){
   961        ref: (string){ string }
   962      }
   963      x: (struct){ |((#struct){
   964          c: (#list){
   965            0: ((string|struct)){ |((string){ string }, (#struct){
   966                ref: (string){ string }
   967              }) }
   968            1: ((string|struct)){ |((string){ string }, (#struct){
   969                ref: (string){ string }
   970              }) }
   971            2: ((string|struct)){ |((string){ string }, (#struct){
   972                ref: (string){ string }
   973              }) }
   974          }
   975        }, (#struct){
   976          ref: (string){ string }
   977        }) }
   978    }
   979    b10: (struct){
   980      a: (#struct){
   981        b: ((string|struct)){ |((string){ string }, (#struct){
   982            d: (string){ string }
   983          }) }
   984      }
   985      c: (#struct){
   986        d: ((string|struct)){ |((string){ string }, (#struct){
   987            b: ((string|struct)){ |((string){ string }, (#struct){
   988                b: ((string|struct)){ |((string){ string }, (#struct){
   989                    b: (string){ string }
   990                  }) }
   991              }) }
   992          }) }
   993      }
   994      d: (struct){
   995        d: (struct){
   996          b: (string){ string }
   997        }
   998      }
   999    }
  1000    b11: (struct){
  1001      #list: (#struct){
  1002        tail: (null){ null }
  1003      }
  1004    }
  1005    b12: (struct){
  1006      #list: (#struct){
  1007        value: (int){ int }
  1008        tail: (null){ null }
  1009        sum: (int){ int }
  1010      }
  1011      list1: (#struct){
  1012        value: (int){ 1 }
  1013        tail: (#struct){
  1014          value: (int){ 2 }
  1015          tail: (#struct){
  1016            value: (int){ 3 }
  1017            tail: (#struct){
  1018              value: (int){ 4 }
  1019              tail: ((null|struct)){ |(*(null){ null }, (#struct){
  1020                  value: (int){ int }
  1021                  tail: (null){ null }
  1022                  sum: (int){ int }
  1023                }) }
  1024              sum: (int){ 4 }
  1025            }
  1026            sum: (int){ 7 }
  1027          }
  1028          sum: (int){ 9 }
  1029        }
  1030        sum: (int){ 10 }
  1031      }
  1032    }
  1033    b12b: (_|_){
  1034      // [structural cycle]
  1035      #list: (_|_){
  1036        // [structural cycle] b12b.#list.tail: structural cycle
  1037      }
  1038      list1: (_|_){
  1039        // [structural cycle] b12b.#list.tail: structural cycle
  1040      }
  1041    }
  1042    b13: (_|_){
  1043      // [structural cycle]
  1044      root: (_|_){
  1045        // [structural cycle]
  1046        a: (_|_){
  1047          // [structural cycle]
  1048          0: (_|_){
  1049            // [structural cycle]
  1050            0: (_|_){
  1051              // [structural cycle] b13.root.a.0.0: structural cycle
  1052            }
  1053          }
  1054        }
  1055      }
  1056    }
  1057    b14: (_|_){
  1058      // [structural cycle]
  1059      root: (_|_){
  1060        // [structural cycle]
  1061        a: (list){
  1062        }
  1063        b: (_|_){
  1064          // [structural cycle]
  1065          0: (list){
  1066          }
  1067          1: (_|_){
  1068            // [structural cycle]
  1069            0: (list){
  1070            }
  1071            1: (_|_){
  1072              // [structural cycle] b14.root.b.1.1: structural cycle
  1073            }
  1074          }
  1075        }
  1076      }
  1077    }
  1078    b15: (struct){
  1079      root: (struct){
  1080        a: (struct){
  1081        }
  1082      }
  1083    }
  1084    p1: (struct){
  1085      #T: (#struct){
  1086        a: (#struct){
  1087        }
  1088      }
  1089      a: (#struct){
  1090        a: (#struct){
  1091          one: (#struct){
  1092            link: (#struct){
  1093              a: (#struct){
  1094                two: (#struct){
  1095                  link: ~(p1.#T)
  1096                }
  1097              }
  1098            }
  1099          }
  1100        }
  1101      }
  1102    }
  1103    p2: (_|_){
  1104      // [structural cycle]
  1105      #T: (_|_){
  1106        // [structural cycle]
  1107        a: (_|_){
  1108          // [structural cycle]
  1109          b: (_|_){
  1110            // [structural cycle]
  1111            link: (_|_){
  1112              // [structural cycle] p2.#T.a.b.link: structural cycle
  1113            }
  1114          }
  1115        }
  1116      }
  1117      a: (_|_){
  1118        // [structural cycle]
  1119        a: (struct){
  1120          one: (struct){
  1121            link: (struct){
  1122              a: (struct){
  1123                two: (struct){
  1124                }
  1125              }
  1126            }
  1127          }
  1128        }
  1129      }
  1130    }
  1131    p3: (_|_){
  1132      // [structural cycle]
  1133      #S: (#struct){
  1134        #T: (#struct){
  1135          a: (#struct){
  1136          }
  1137        }
  1138      }
  1139      #U: (_|_){
  1140        // [structural cycle]
  1141        #T: (_|_){
  1142          // [structural cycle]
  1143          a: (_|_){
  1144            // [structural cycle]
  1145            b: (_|_){
  1146              // [structural cycle]
  1147              link: (_|_){
  1148                // [structural cycle] p3.#U.#T.a.b.link: structural cycle
  1149              }
  1150            }
  1151          }
  1152        }
  1153      }
  1154      a: (_|_){
  1155        // [structural cycle] p3.#U.#T.a.b.link: structural cycle
  1156      }
  1157    }
  1158    p4: (struct){
  1159      #T: (#struct){
  1160        a: (list){
  1161        }
  1162      }
  1163      a: (#struct){
  1164        a: (#list){
  1165          0: (#struct){
  1166            link: (#struct){
  1167              a: (#list){
  1168                0: (#struct){
  1169                  link: ~(p4.#T)
  1170                }
  1171              }
  1172            }
  1173          }
  1174        }
  1175      }
  1176    }
  1177    p5: (_|_){
  1178      // [structural cycle]
  1179      #T: (_|_){
  1180        // [structural cycle]
  1181        a: (_|_){
  1182          // [structural cycle]
  1183          0: (_|_){
  1184            // [structural cycle]
  1185            link: (_|_){
  1186              // [structural cycle] p5.#T.a.0.link: structural cycle
  1187            }
  1188          }
  1189        }
  1190      }
  1191      a: (_|_){
  1192        // [structural cycle]
  1193        a: (#list){
  1194          0: (struct){
  1195            link: (struct){
  1196              a: (#list){
  1197                0: (struct){
  1198                }
  1199              }
  1200            }
  1201          }
  1202        }
  1203      }
  1204    }
  1205    p6: (_|_){
  1206      // [structural cycle]
  1207      #S: (#struct){
  1208        #T: (#struct){
  1209          a: (list){
  1210          }
  1211        }
  1212      }
  1213      #U: (_|_){
  1214        // [structural cycle]
  1215        #T: (_|_){
  1216          // [structural cycle]
  1217          a: (_|_){
  1218            // [structural cycle]
  1219            0: (_|_){
  1220              // [structural cycle]
  1221              link: (_|_){
  1222                // [structural cycle] p6.#U.#T.a.0.link: structural cycle
  1223              }
  1224            }
  1225          }
  1226        }
  1227      }
  1228      a: (_|_){
  1229        // [structural cycle] p6.#U.#T.a.0.link: structural cycle
  1230      }
  1231    }
  1232    c1: (_|_){
  1233      // [structural cycle]
  1234      a: (_|_){
  1235        // [structural cycle]
  1236        b: (struct){
  1237        }
  1238        c: (_|_){
  1239          // [structural cycle]
  1240          b: (struct){
  1241          }
  1242          c: (_|_){
  1243            // [structural cycle] c1.a.c.c: structural cycle
  1244          }
  1245        }
  1246      }
  1247    }
  1248    d1: (_|_){
  1249      // [structural cycle]
  1250      a: (_|_){
  1251        // [structural cycle]
  1252        b: (_|_){
  1253          // [structural cycle]
  1254          c: (_|_){
  1255            // [structural cycle]
  1256            d: (_|_){
  1257              // [structural cycle]
  1258              h: (int){ int }
  1259              t: (_|_){
  1260                // [structural cycle] d1.r: structural cycle
  1261              }
  1262            }
  1263          }
  1264        }
  1265      }
  1266      r: (_|_){
  1267        // [structural cycle] d1.r: structural cycle
  1268      }
  1269      x: (_|_){
  1270        // [structural cycle] d1.r: structural cycle
  1271      }
  1272    }
  1273    d2: (_|_){
  1274      // [structural cycle]
  1275      x: ~(d2.a.b.c)
  1276      r: ~(d2.a.b)
  1277      a: (_|_){
  1278        // [structural cycle]
  1279        b: (_|_){
  1280          // [structural cycle]
  1281          c: (_|_){
  1282            // [structural cycle]
  1283            d: (_|_){
  1284              // [structural cycle]
  1285              h: (int){ int }
  1286              t: (_|_){
  1287                // [structural cycle] d2.a.b.c.d.t: structural cycle
  1288              }
  1289            }
  1290          }
  1291        }
  1292      }
  1293    }
  1294    d3: (_|_){
  1295      // [structural cycle]
  1296      config: (struct){
  1297        a: (struct){
  1298          b: (struct){
  1299            c: (null){ null }
  1300          }
  1301        }
  1302        indirect: (null){ null }
  1303        i: (int){ |(*(int){ 1 }, (int){ int }) }
  1304      }
  1305      x: (_|_){
  1306        // [structural cycle]
  1307        i: (int){ 0 }
  1308        a: (_|_){
  1309          // [structural cycle]
  1310          b: (_|_){
  1311            // [structural cycle]
  1312            c: (_|_){
  1313              // [structural cycle] d3.x.indirect: structural cycle
  1314            }
  1315          }
  1316        }
  1317        indirect: (_|_){
  1318          // [structural cycle] d3.x.indirect: structural cycle
  1319        }
  1320      }
  1321    }
  1322    shortPathFail: (_|_){
  1323      // [structural cycle]
  1324      doubleRef: (struct){
  1325        a: ~(shortPathFail.doubleRef.#List)
  1326        #List: (#struct){
  1327          Next: (null){ null }
  1328        }
  1329      }
  1330      elipsis: (_|_){
  1331        // [structural cycle]
  1332        t1: (struct){
  1333          #Foo: (#struct){
  1334            ref: (null){ null }
  1335          }
  1336        }
  1337        t2: (_|_){
  1338          // [structural cycle]
  1339          Foo: (_|_){
  1340            // [structural cycle]
  1341            ref: (_|_){
  1342              // [structural cycle] shortPathFail.elipsis.t2.Foo.ref: structural cycle
  1343            }
  1344          }
  1345        }
  1346      }
  1347      comprehension: (struct){
  1348        #list: (#struct){
  1349          tail: (null){ null }
  1350        }
  1351      }
  1352    }
  1353    patternFail: (_|_){
  1354      // [structural cycle]
  1355      issue2374: (_|_){
  1356        // [structural cycle]
  1357        a: (_|_){
  1358          // [structural cycle]
  1359          r: (int){ 0 }
  1360          b: (_|_){
  1361            // [structural cycle] patternFail.issue2374.a.b: structural cycle
  1362          }
  1363        }
  1364      }
  1365    }
  1366    withLetFail: (_|_){
  1367      // [structural cycle]
  1368      schema: (_|_){
  1369        // [structural cycle]
  1370        next: (_|_){
  1371          // [structural cycle] withLetFail.schema.next: structural cycle
  1372        }
  1373      }
  1374      let _schema_1#1 = (_|_){
  1375        // [structural cycle]
  1376      }
  1377    }
  1378    fieldsSumInfinite: (_|_){
  1379      // [structural cycle]
  1380      issue3310: (_|_){
  1381        // [structural cycle]
  1382        cheeseburger: (float){ 3.00 }
  1383        fries: (float){ 2.00 }
  1384        sprite: (float){ 1.00 }
  1385        total: (_|_){
  1386          // [structural cycle] 3: structural cycle:
  1387          //     ./in.cue:371:9
  1388        }
  1389      }
  1390    }
  1391    listOptOK: (struct){
  1392      list: (struct){
  1393        head: (int){ int }
  1394        tail?: (_|_){
  1395          // [structural cycle] listOptOK.list.tail: structural cycle
  1396        }
  1397      }
  1398      a: (struct){
  1399        head: (int){ 3 }
  1400        tail: (struct){
  1401          head: (int){ 2 }
  1402          tail?: ~(listOptOK.list)
  1403        }
  1404      }
  1405    }
  1406    issue2545: (_|_){
  1407      // [structural cycle]
  1408      #A: (#struct){
  1409        B?: ~(issue2545.#B)
  1410      }
  1411      #B: (_|_){
  1412        // [structural cycle]
  1413        A: (_|_){
  1414          // [structural cycle] issue2545.#B.A: structural cycle
  1415        }
  1416      }
  1417    }
  1418    e1: (_|_){
  1419      // [structural cycle]
  1420      a: (_|_){
  1421        // [structural cycle]
  1422        c: (_|_){
  1423          // [structural cycle] e1.a.c: structural cycle
  1424        }
  1425      }
  1426      b: (_|_){
  1427        // [structural cycle]
  1428        c: (_|_){
  1429          // [structural cycle] e1.b.c: structural cycle
  1430        }
  1431      }
  1432    }
  1433    e2: (_|_){
  1434      // [structural cycle]
  1435      a: (_|_){
  1436        // [structural cycle]
  1437        c: (_|_){
  1438          // [structural cycle] e2.a.c: structural cycle
  1439        }
  1440      }
  1441      b: (_|_){
  1442        // [structural cycle]
  1443        c: (_|_){
  1444          // [structural cycle] e2.b.c: structural cycle
  1445        }
  1446      }
  1447    }
  1448    e3: (_|_){
  1449      // [eval]
  1450      a: (_|_){
  1451        // [eval] e3.a: conflicting values [a] and {c:a} (mismatched types list and struct):
  1452        //     ./in.cue:412:5
  1453        //     ./in.cue:413:5
  1454        c: (_|_){// 〈1;a〉
  1455        }
  1456        0: (_|_){// 〈1;a〉
  1457        }
  1458      }
  1459      b: (_|_){
  1460        // [eval] e3.b: conflicting values [b] and {c:b} (mismatched types list and struct):
  1461        //     ./in.cue:415:5
  1462        //     ./in.cue:416:5
  1463        c: (_|_){// 〈1;b〉
  1464        }
  1465        0: (_|_){// 〈1;b〉
  1466        }
  1467      }
  1468    }
  1469    e4: (_|_){
  1470      // [eval]
  1471      a: (_|_){
  1472        // [eval]
  1473        0: (_|_){
  1474          // [eval] e4.a.0: 4 errors in empty disjunction:
  1475          // e4.a.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
  1476          //     ./in.cue:420:10
  1477          //     ./in.cue:421:6
  1478          // e4.a.0.0: 2 errors in empty disjunction:
  1479          // e4.a.0.0: conflicting values [{c:1}] and {c:1} (mismatched types list and struct):
  1480          //     ./in.cue:421:6
  1481          //     ./in.cue:421:7
  1482          // e4.a.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
  1483          //     ./in.cue:420:10
  1484          //     ./in.cue:421:6
  1485          0: (struct){
  1486            c: (int){ 1 }
  1487          }
  1488        }
  1489      }
  1490      b: (_|_){
  1491        // [eval]
  1492        0: (_|_){
  1493          // [eval] e4.b.0: 4 errors in empty disjunction:
  1494          // e4.b.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
  1495          //     ./in.cue:423:6
  1496          //     ./in.cue:424:10
  1497          // e4.b.0.0: 2 errors in empty disjunction:
  1498          // e4.b.0.0: conflicting values [{c:1}] and {c:1} (mismatched types list and struct):
  1499          //     ./in.cue:423:6
  1500          //     ./in.cue:423:7
  1501          // e4.b.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
  1502          //     ./in.cue:423:6
  1503          //     ./in.cue:424:10
  1504          0: (struct){
  1505            c: (int){ 1 }
  1506          }
  1507        }
  1508      }
  1509    }
  1510    e5: (struct){
  1511      a: (struct){
  1512        c: (int){ int }
  1513      }
  1514      b: (struct){
  1515        c: (int){ int }
  1516      }
  1517    }
  1518    nestedList: (_|_){
  1519      // [eval]
  1520      v1e: (_|_){
  1521        // [eval]
  1522        x: (#list){
  1523          0: (int){ int }
  1524          1: (int){ 1 }
  1525        }
  1526        y: (_|_){
  1527          // [eval]
  1528          0: (_|_){
  1529            // [eval] nestedList.v1e.y.0: 4 errors in empty disjunction:
  1530            // nestedList.v1e.y.0: conflicting values [[2],1] and int (mismatched types list and int):
  1531            //     ./in.cue:438:11
  1532            //     ./in.cue:439:11
  1533            // nestedList.v1e.y.0.0: 2 errors in empty disjunction:
  1534            // nestedList.v1e.y.0.0: conflicting values [2] and int (mismatched types list and int):
  1535            //     ./in.cue:438:11
  1536            //     ./in.cue:439:12
  1537            // nestedList.v1e.y.0.0: incompatible list lengths (1 and 2):
  1538            //     ./in.cue:438:6
  1539            0: (list){ list }
  1540            1: (int){ 1 }
  1541          }
  1542          1: (int){ 1 }
  1543        }
  1544      }
  1545      v2e: (_|_){
  1546        // [eval]
  1547        y: (_|_){
  1548          // [eval]
  1549          0: (_|_){
  1550            // [eval] nestedList.v2e.y.0: 4 errors in empty disjunction:
  1551            // nestedList.v2e.y.0: conflicting values [[2],1] and int (mismatched types list and int):
  1552            //     ./in.cue:443:11
  1553            //     ./in.cue:444:11
  1554            // nestedList.v2e.y.0.0: 2 errors in empty disjunction:
  1555            // nestedList.v2e.y.0.0: conflicting values [2] and int (mismatched types list and int):
  1556            //     ./in.cue:443:12
  1557            //     ./in.cue:444:11
  1558            // nestedList.v2e.y.0.0: incompatible list lengths (1 and 2):
  1559            //     ./in.cue:444:6
  1560            0: (list){ list }
  1561            1: (int){ 1 }
  1562          }
  1563          1: (int){ 1 }
  1564        }
  1565        x: (#list){
  1566          0: (int){ int }
  1567          1: (int){ 1 }
  1568        }
  1569      }
  1570      v1: (struct){
  1571        x: (#list){
  1572          0: (int){ int }
  1573          1: (int){ 1 }
  1574        }
  1575        y: (#list){
  1576          0: (#list){
  1577            0: (#list){
  1578              0: (int){ 2 }
  1579              1: (int){ 1 }
  1580            }
  1581            1: (int){ 1 }
  1582          }
  1583          1: (int){ 1 }
  1584        }
  1585      }
  1586      v2: (struct){
  1587        y: (#list){
  1588          0: (#list){
  1589            0: (#list){
  1590              0: (int){ 2 }
  1591              1: (int){ 1 }
  1592            }
  1593            1: (int){ 1 }
  1594          }
  1595          1: (int){ 1 }
  1596        }
  1597        x: (#list){
  1598          0: (int){ int }
  1599          1: (int){ 1 }
  1600        }
  1601      }
  1602    }
  1603    v3: (struct){
  1604      list: (struct){
  1605        head: (int){ int }
  1606        tail: (null){ null }
  1607      }
  1608      myList: (struct){
  1609        head: (int){ 2 }
  1610        tail: (struct){
  1611          head: (int){ 3 }
  1612          tail: (struct){
  1613            head: (int){ 4 }
  1614            tail: ((null|struct)){ |((struct){
  1615                head: (int){ int }
  1616                tail: (null){ null }
  1617              }, (null){ null }) }
  1618          }
  1619        }
  1620      }
  1621    }
  1622    v4: (struct){
  1623      list: (struct){
  1624        head: (int){ int }
  1625        tail: (int){ 1 }
  1626      }
  1627      myList: (struct){
  1628        head: (int){ 2 }
  1629        tail: (struct){
  1630          head: (int){ 3 }
  1631          tail: ((int|struct)){ |((struct){
  1632              head: (int){ int }
  1633              tail: (int){ 1 }
  1634            }, (int){ 1 }) }
  1635        }
  1636      }
  1637    }
  1638    v5: (struct){
  1639      list: (struct){
  1640        head: (int){ int }
  1641        tail: (struct){
  1642        }
  1643      }
  1644      myList: (struct){
  1645        head: (int){ 2 }
  1646        tail: (struct){ |((struct){
  1647            head: (int){ 3 }
  1648            tail: (struct){ |((struct){
  1649                head: (int){ int }
  1650                tail: (struct){
  1651                }
  1652              }, (struct){
  1653              }) }
  1654          }, (struct){
  1655            head: (int){ 3 }
  1656          }) }
  1657      }
  1658    }
  1659    z1: (_|_){
  1660      // [structural cycle]
  1661      y: (struct){
  1662        f: (struct){
  1663          h: (_){ _ }
  1664        }
  1665        g: (_){ _ }
  1666      }
  1667      x: (struct){
  1668        f: (_){ _ }
  1669        g: (_){ _ }
  1670      }
  1671      z: (_|_){
  1672        // [structural cycle]
  1673        f: (_|_){
  1674          // [structural cycle]
  1675          h: ~(z1.z.g)
  1676        }
  1677        g: (_|_){
  1678          // [structural cycle]
  1679          h: (_|_){
  1680            // [structural cycle] z1.z.g.h: structural cycle
  1681          }
  1682        }
  1683      }
  1684    }
  1685    crossRefNoCycle: (struct){
  1686      t1: (struct){
  1687        T: (struct){
  1688          x: (_){ _ }
  1689          y: (_){ _ }
  1690        }
  1691        C: (struct){
  1692          x: (struct){
  1693            x: (_){ _ }
  1694            y: (_){ _ }
  1695          }
  1696          y: ~(crossRefNoCycle.t1.C.x)
  1697        }
  1698      }
  1699      t2: (struct){
  1700        T: (struct){
  1701          x: (_){ _ }
  1702          y: (_){ _ }
  1703        }
  1704        C: (struct){
  1705          x: (struct){
  1706            x: (_){ _ }
  1707            y: (_){ _ }
  1708          }
  1709          y: ~(crossRefNoCycle.t2.C.x)
  1710        }
  1711      }
  1712      t3: (struct){
  1713        T: (struct){
  1714          x: (_){ _ }
  1715          y: (_){ _ }
  1716          z: (_){ _ }
  1717        }
  1718        C: (struct){
  1719          x: (struct){
  1720            x: (_){ _ }
  1721            y: (_){ _ }
  1722            z: (_){ _ }
  1723          }
  1724          y: ~(crossRefNoCycle.t3.C.x)
  1725          z: ~(crossRefNoCycle.t3.C.x)
  1726        }
  1727      }
  1728      t4: (struct){
  1729        T: (struct){
  1730          x: (_){ _ }
  1731          y: (_){ _ }
  1732          z: (_){ _ }
  1733        }
  1734        C: (struct){
  1735          x: (struct){
  1736            x: (struct){
  1737              x: (_){ _ }
  1738              y: (_){ _ }
  1739              z: (_){ _ }
  1740            }
  1741            y: ~(crossRefNoCycle.t4.C.x.x)
  1742            z: ~(crossRefNoCycle.t4.C.x.x)
  1743          }
  1744          y: ~(crossRefNoCycle.t4.C.x)
  1745          z: ~(crossRefNoCycle.t4.C.x)
  1746        }
  1747      }
  1748      t5: (struct){
  1749        T: (struct){
  1750          y: (_|_){
  1751            // [incomplete] crossRefNoCycle.t5.T.y: undefined field: x:
  1752            //     ./in.cue:556:8
  1753          }
  1754        }
  1755        C: (struct){
  1756          x: ~(crossRefNoCycle.t5.T)
  1757          y: ~(crossRefNoCycle.t5.T)
  1758        }
  1759      }
  1760    }
  1761    n1: (struct){
  1762      a: (struct){
  1763        b: (int){ int }
  1764      }
  1765    }
  1766    n2: (struct){
  1767      a: (struct){
  1768        b: (int){ int }
  1769        a: (struct){
  1770          b: (int){ int }
  1771        }
  1772      }
  1773    }
  1774    n3: (struct){
  1775      a: (struct){
  1776        b: (int){ int }
  1777      }
  1778    }
  1779    n4: (struct){
  1780      x: (struct){
  1781        y: (struct){
  1782          z: (int){ int }
  1783          a: (struct){
  1784            b: (int){ int }
  1785          }
  1786        }
  1787        a: (struct){
  1788          b: (int){ int }
  1789        }
  1790      }
  1791      a: (struct){
  1792        b: (int){ int }
  1793      }
  1794    }
  1795  }
  1796  -- diff/-out/evalalpha<==>+out/eval --
  1797  diff old new
  1798  --- old
  1799  +++ new
  1800  @@ -4,22 +4,24 @@
  1801   b12b.#list.tail: structural cycle
  1802   b13.root.a.0.0: structural cycle
  1803   b14.root.b.1.1: structural cycle
  1804  +b4.b.0: conflicting values 1 and [y] (mismatched types int and list):
  1805  +    ./in.cue:55:12
  1806  +    ./in.cue:56:8
  1807   b4.cond1.x.y.0: structural cycle
  1808   b4.cond2.x.y.0: structural cycle
  1809   b4.x.y.0: structural cycle
  1810   b6.b.a.0: conflicting values 1 and [1] (mismatched types int and list):
  1811  -    ./in.cue:94:5
  1812       ./in.cue:94:13
  1813       ./in.cue:94:14
  1814  -    ./in.cue:95:9
  1815  -b6.b.a.0.0: structural cycle
  1816   b6.x.a.0: structural cycle
  1817   b7.a.0: structural cycle
  1818  +b7.b.0.0: conflicting values 1 and [a] (mismatched types int and list):
  1819  +    ./in.cue:99:11
  1820  +    ./in.cue:100:5
  1821   c1.a.c.c: structural cycle
  1822  -d1.a.b.c.d.t: structural cycle
  1823  +d1.r: structural cycle
  1824   d2.a.b.c.d.t: structural cycle
  1825  -d2.r.c.d.t: structural cycle
  1826  -d3.x.a.b.c: structural cycle
  1827  +d3.x.indirect: structural cycle
  1828   e1.a.c: structural cycle
  1829   e1.b.c: structural cycle
  1830   e2.a.c: structural cycle
  1831  @@ -27,21 +29,18 @@
  1832   e3.a: conflicting values [a] and {c:a} (mismatched types list and struct):
  1833       ./in.cue:412:5
  1834       ./in.cue:413:5
  1835  -e3.a.c: structural cycle
  1836   e3.b: conflicting values [b] and {c:b} (mismatched types list and struct):
  1837       ./in.cue:415:5
  1838       ./in.cue:416:5
  1839  -e3.b.c: structural cycle
  1840   e4.a.0: 4 errors in empty disjunction:
  1841   e4.a.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
  1842       ./in.cue:420:10
  1843       ./in.cue:421:6
  1844   e4.a.0.0: 2 errors in empty disjunction:
  1845  -e4.a.0.0: conflicting values [[{c:1}]] and {c:1} (mismatched types list and struct):
  1846  -    ./in.cue:421:5
  1847  +e4.a.0.0: conflicting values [{c:1}] and {c:1} (mismatched types list and struct):
  1848  +    ./in.cue:421:6
  1849       ./in.cue:421:7
  1850   e4.a.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
  1851  -    ./in.cue:420:6
  1852       ./in.cue:420:10
  1853       ./in.cue:421:6
  1854   e4.b.0: 4 errors in empty disjunction:
  1855  @@ -49,48 +48,45 @@
  1856       ./in.cue:423:6
  1857       ./in.cue:424:10
  1858   e4.b.0.0: 2 errors in empty disjunction:
  1859  -e4.b.0.0: conflicting values [(b|{})] and {c:1} (mismatched types list and struct):
  1860  +e4.b.0.0: conflicting values [{c:1}] and {c:1} (mismatched types list and struct):
  1861  +    ./in.cue:423:6
  1862       ./in.cue:423:7
  1863  -    ./in.cue:424:5
  1864   e4.b.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
  1865       ./in.cue:423:6
  1866  -    ./in.cue:424:6
  1867       ./in.cue:424:10
  1868   issue2545.#B.A: structural cycle
  1869   nestedList.v1e.y.0: 4 errors in empty disjunction:
  1870  -nestedList.v1e.y.0: conflicting values int and [[2],1] (mismatched types int and list):
  1871  +nestedList.v1e.y.0: conflicting values [[2],1] and int (mismatched types list and int):
  1872       ./in.cue:438:11
  1873       ./in.cue:439:11
  1874   nestedList.v1e.y.0.0: 2 errors in empty disjunction:
  1875  -nestedList.v1e.y.0.0: conflicting values int and [2] (mismatched types int and list):
  1876  +nestedList.v1e.y.0.0: conflicting values [2] and int (mismatched types list and int):
  1877       ./in.cue:438:11
  1878       ./in.cue:439:12
  1879  -nestedList.v1e.y.0.0: incompatible list lengths (1 and 2)
  1880   nestedList.v2e.y.0: 4 errors in empty disjunction:
  1881  -nestedList.v2e.y.0: conflicting values int and [[2],1] (mismatched types int and list):
  1882  +nestedList.v2e.y.0: conflicting values [[2],1] and int (mismatched types list and int):
  1883       ./in.cue:443:11
  1884       ./in.cue:444:11
  1885   nestedList.v2e.y.0.0: 2 errors in empty disjunction:
  1886  -nestedList.v2e.y.0.0: conflicting values int and [2] (mismatched types int and list):
  1887  +nestedList.v2e.y.0.0: conflicting values [2] and int (mismatched types list and int):
  1888       ./in.cue:443:12
  1889       ./in.cue:444:11
  1890  -nestedList.v2e.y.0.0: incompatible list lengths (1 and 2)
  1891   p2.#T.a.b.link: structural cycle
  1892   p3.#U.#T.a.b.link: structural cycle
  1893   p5.#T.a.0.link: structural cycle
  1894   p6.#U.#T.a.0.link: structural cycle
  1895   patternFail.issue2374.a.b: structural cycle
  1896  +resolveToAncestor.t1.X.b: structural cycle
  1897   resolveToAncestor.t2.X.b: structural cycle
  1898  -shortPathFail.elipsis.t2.Foo.ref.ref: structural cycle
  1899  +shortPathFail.elipsis.t2.Foo.ref: structural cycle
  1900   withLetFail.schema.next: structural cycle
  1901  -z1.z.f.h: structural cycle
  1902   z1.z.g.h: structural cycle
  1903  -resolveToAncestor.t1.X.b: structural cycle:
  1904  -    ./edge.cue:3:6
  1905  -d1.r: structural cycle:
  1906  -    ./in.cue:301:26
  1907  -d3.x.indirect: structural cycle:
  1908  -    ./in.cue:316:12
  1909  +3: structural cycle:
  1910  +    ./in.cue:371:9
  1911  +nestedList.v1e.y.0.0: incompatible list lengths (1 and 2):
  1912  +    ./in.cue:438:6
  1913  +nestedList.v2e.y.0.0: incompatible list lengths (1 and 2):
  1914  +    ./in.cue:444:6
  1915   
  1916   Result:
  1917   (_|_){
  1918  @@ -101,13 +97,9 @@
  1919         // [structural cycle]
  1920         X: (_|_){
  1921           // [structural cycle]
  1922  -        a: (_|_){
  1923  -          // [structural cycle] resolveToAncestor.t1.X.b: structural cycle:
  1924  -          //     ./edge.cue:3:6
  1925  -        }
  1926  -        b: (_|_){
  1927  -          // [structural cycle] resolveToAncestor.t1.X.b: structural cycle:
  1928  -          //     ./edge.cue:3:6
  1929  +        a: (_){ _ }
  1930  +        b: (_|_){
  1931  +          // [structural cycle] resolveToAncestor.t1.X.b: structural cycle
  1932           }
  1933         }
  1934       }
  1935  @@ -161,10 +153,7 @@
  1936     a7: (struct){
  1937       a: (string){ "foo" }
  1938       b: (struct){
  1939  -      x: (struct){
  1940  -        x: (string){ "foo" }
  1941  -        y: (int){ 3 }
  1942  -      }
  1943  +      x: ~(a7.c)
  1944         y: (string){ "foo" }
  1945       }
  1946       c: (struct){
  1947  @@ -201,11 +190,15 @@
  1948       }
  1949     }
  1950     b4: (_|_){
  1951  -    // [structural cycle]
  1952  -    b: (_|_){
  1953  -      // [structural cycle]
  1954  -      0: (_|_){
  1955  -        // [structural cycle] b4.x.y.0: structural cycle
  1956  +    // [eval]
  1957  +    b: (_|_){
  1958  +      // [eval]
  1959  +      0: (_|_){
  1960  +        // [eval] b4.b.0: conflicting values 1 and [y] (mismatched types int and list):
  1961  +        //     ./in.cue:55:12
  1962  +        //     ./in.cue:56:8
  1963  +        0: (_|_){// 〈1;y〉
  1964  +        }
  1965         }
  1966       }
  1967       x: (_|_){
  1968  @@ -273,12 +266,9 @@
  1969           // [eval]
  1970           0: (_|_){
  1971             // [eval] b6.b.a.0: conflicting values 1 and [1] (mismatched types int and list):
  1972  -          //     ./in.cue:94:5
  1973             //     ./in.cue:94:13
  1974             //     ./in.cue:94:14
  1975  -          //     ./in.cue:95:9
  1976  -          0: (_|_){
  1977  -            // [structural cycle] b6.b.a.0.0: structural cycle
  1978  +          0: (_|_){// 1 & 〈1;a〉
  1979             }
  1980           }
  1981         }
  1982  @@ -294,11 +284,18 @@
  1983       }
  1984     }
  1985     b7: (_|_){
  1986  -    // [structural cycle]
  1987  -    b: (_|_){
  1988  -      // [structural cycle]
  1989  -      0: (_|_){
  1990  -        // [structural cycle] b7.a.0: structural cycle
  1991  +    // [eval]
  1992  +    b: (_|_){
  1993  +      // [eval]
  1994  +      0: (_|_){
  1995  +        // [eval]
  1996  +        0: (_|_){
  1997  +          // [eval] b7.b.0.0: conflicting values 1 and [a] (mismatched types int and list):
  1998  +          //     ./in.cue:99:11
  1999  +          //     ./in.cue:100:5
  2000  +          0: (_|_){// 〈1;a〉
  2001  +          }
  2002  +        }
  2003         }
  2004       }
  2005       a: (_|_){
  2006  @@ -309,9 +306,7 @@
  2007       }
  2008     }
  2009     b8: (struct){
  2010  -    x: (struct){
  2011  -      f: (string){ string }
  2012  -    }
  2013  +    x: ~(b8.a)
  2014       a: (struct){
  2015         f: (string){ string }
  2016       }
  2017  @@ -337,7 +332,7 @@
  2018       #ref: (#struct){
  2019         ref: (string){ string }
  2020       }
  2021  -    x: (#struct){ |((#struct){
  2022  +    x: (struct){ |((#struct){
  2023           c: (#list){
  2024             0: ((string|struct)){ |((string){ string }, (#struct){
  2025                 ref: (string){ string }
  2026  @@ -360,7 +355,13 @@
  2027           }) }
  2028       }
  2029       c: (#struct){
  2030  -      d: (string){ string }
  2031  +      d: ((string|struct)){ |((string){ string }, (#struct){
  2032  +          b: ((string|struct)){ |((string){ string }, (#struct){
  2033  +              b: ((string|struct)){ |((string){ string }, (#struct){
  2034  +                  b: (string){ string }
  2035  +                }) }
  2036  +            }) }
  2037  +        }) }
  2038       }
  2039       d: (struct){
  2040         d: (struct){
  2041  @@ -370,9 +371,7 @@
  2042     }
  2043     b11: (struct){
  2044       #list: (#struct){
  2045  -      tail: ((null|struct)){ |(*(null){ null }, (#struct){
  2046  -          tail: (null){ null }
  2047  -        }) }
  2048  +      tail: (null){ null }
  2049       }
  2050     }
  2051     b12: (struct){
  2052  @@ -389,7 +388,11 @@
  2053             value: (int){ 3 }
  2054             tail: (#struct){
  2055               value: (int){ 4 }
  2056  -            tail: (null){ null }
  2057  +            tail: ((null|struct)){ |(*(null){ null }, (#struct){
  2058  +                value: (int){ int }
  2059  +                tail: (null){ null }
  2060  +                sum: (int){ int }
  2061  +              }) }
  2062               sum: (int){ 4 }
  2063             }
  2064             sum: (int){ 7 }
  2065  @@ -461,10 +464,7 @@
  2066             link: (#struct){
  2067               a: (#struct){
  2068                 two: (#struct){
  2069  -                link: (#struct){
  2070  -                  a: (#struct){
  2071  -                  }
  2072  -                }
  2073  +                link: ~(p1.#T)
  2074                 }
  2075               }
  2076             }
  2077  @@ -538,10 +538,7 @@
  2078             link: (#struct){
  2079               a: (#list){
  2080                 0: (#struct){
  2081  -                link: (#struct){
  2082  -                  a: (list){
  2083  -                  }
  2084  -                }
  2085  +                link: ~(p4.#T)
  2086                 }
  2087               }
  2088             }
  2089  @@ -632,47 +629,27 @@
  2090               // [structural cycle]
  2091               h: (int){ int }
  2092               t: (_|_){
  2093  -              // [structural cycle] d1.a.b.c.d.t: structural cycle
  2094  -            }
  2095  -          }
  2096  -        }
  2097  -      }
  2098  -    }
  2099  -    r: (_|_){
  2100  -      // [structural cycle] d1.r: structural cycle:
  2101  -      //     ./in.cue:301:26
  2102  -    }
  2103  -    x: (_|_){
  2104  -      // [structural cycle] d1.a.b.c.d.t: structural cycle
  2105  +              // [structural cycle] d1.r: structural cycle
  2106  +            }
  2107  +          }
  2108  +        }
  2109  +      }
  2110  +    }
  2111  +    r: (_|_){
  2112  +      // [structural cycle] d1.r: structural cycle
  2113  +    }
  2114  +    x: (_|_){
  2115  +      // [structural cycle] d1.r: structural cycle
  2116       }
  2117     }
  2118     d2: (_|_){
  2119       // [structural cycle]
  2120  -    x: (_|_){
  2121  -      // [structural cycle]
  2122  -      d: (_|_){
  2123  -        // [structural cycle]
  2124  -        h: (int){ int }
  2125  -        t: (_|_){
  2126  -          // [structural cycle]
  2127  -        }
  2128  -      }
  2129  -    }
  2130  -    r: (_|_){
  2131  -      // [structural cycle]
  2132  -      c: (_|_){
  2133  -        // [structural cycle]
  2134  -        d: (_|_){
  2135  -          // [structural cycle]
  2136  -          h: (int){ int }
  2137  -          t: (_|_){
  2138  -            // [structural cycle] d2.r.c.d.t: structural cycle
  2139  -          }
  2140  -        }
  2141  -      }
  2142  -    }
  2143  -    a: (struct){
  2144  -      b: (struct){
  2145  +    x: ~(d2.a.b.c)
  2146  +    r: ~(d2.a.b)
  2147  +    a: (_|_){
  2148  +      // [structural cycle]
  2149  +      b: (_|_){
  2150  +        // [structural cycle]
  2151           c: (_|_){
  2152             // [structural cycle]
  2153             d: (_|_){
  2154  @@ -699,28 +676,25 @@
  2155       }
  2156       x: (_|_){
  2157         // [structural cycle]
  2158  +      i: (int){ 0 }
  2159         a: (_|_){
  2160           // [structural cycle]
  2161           b: (_|_){
  2162             // [structural cycle]
  2163             c: (_|_){
  2164  -            // [structural cycle] d3.x.a.b.c: structural cycle
  2165  +            // [structural cycle] d3.x.indirect: structural cycle
  2166             }
  2167           }
  2168         }
  2169         indirect: (_|_){
  2170  -        // [structural cycle] d3.x.indirect: structural cycle:
  2171  -        //     ./in.cue:316:12
  2172  -      }
  2173  -      i: (int){ 0 }
  2174  +        // [structural cycle] d3.x.indirect: structural cycle
  2175  +      }
  2176       }
  2177     }
  2178     shortPathFail: (_|_){
  2179       // [structural cycle]
  2180       doubleRef: (struct){
  2181  -      a: (#struct){
  2182  -        Next: (null){ null }
  2183  -      }
  2184  +      a: ~(shortPathFail.doubleRef.#List)
  2185         #List: (#struct){
  2186           Next: (null){ null }
  2187         }
  2188  @@ -729,9 +703,7 @@
  2189         // [structural cycle]
  2190         t1: (struct){
  2191           #Foo: (#struct){
  2192  -          ref: ((null|struct)){ |((null){ null }, (#struct){
  2193  -              ref: (null){ null }
  2194  -            }) }
  2195  +          ref: (null){ null }
  2196           }
  2197         }
  2198         t2: (_|_){
  2199  @@ -739,10 +711,7 @@
  2200           Foo: (_|_){
  2201             // [structural cycle]
  2202             ref: (_|_){
  2203  -            // [structural cycle]
  2204  -            ref: (_|_){
  2205  -              // [structural cycle] shortPathFail.elipsis.t2.Foo.ref.ref: structural cycle
  2206  -            }
  2207  +            // [structural cycle] shortPathFail.elipsis.t2.Foo.ref: structural cycle
  2208             }
  2209           }
  2210         }
  2211  @@ -749,9 +718,7 @@
  2212       }
  2213       comprehension: (struct){
  2214         #list: (#struct){
  2215  -        tail: ((null|struct)){ |(*(null){ null }, (#struct){
  2216  -            tail: (null){ null }
  2217  -          }) }
  2218  +        tail: (null){ null }
  2219         }
  2220       }
  2221     }
  2222  @@ -777,8 +744,7 @@
  2223         }
  2224       }
  2225       let _schema_1#1 = (_|_){
  2226  -      // [structural cycle] withLetFail._schema_1: structural cycle:
  2227  -      //     ./in.cue:362:17
  2228  +      // [structural cycle]
  2229       }
  2230     }
  2231     fieldsSumInfinite: (_|_){
  2232  @@ -789,7 +755,8 @@
  2233         fries: (float){ 2.00 }
  2234         sprite: (float){ 1.00 }
  2235         total: (_|_){
  2236  -        // [structural cycle]
  2237  +        // [structural cycle] 3: structural cycle:
  2238  +        //     ./in.cue:371:9
  2239         }
  2240       }
  2241     }
  2242  @@ -804,9 +771,7 @@
  2243         head: (int){ 3 }
  2244         tail: (struct){
  2245           head: (int){ 2 }
  2246  -        tail?: (_|_){
  2247  -          // [structural cycle] listOptOK.a.tail.tail: structural cycle
  2248  -        }
  2249  +        tail?: ~(listOptOK.list)
  2250         }
  2251       }
  2252     }
  2253  @@ -813,12 +778,7 @@
  2254     issue2545: (_|_){
  2255       // [structural cycle]
  2256       #A: (#struct){
  2257  -      B?: (_|_){
  2258  -        // [structural cycle]
  2259  -        A: (_|_){
  2260  -          // [structural cycle] issue2545.#A.B.A: structural cycle
  2261  -        }
  2262  -      }
  2263  +      B?: ~(issue2545.#B)
  2264       }
  2265       #B: (_|_){
  2266         // [structural cycle]
  2267  @@ -863,11 +823,9 @@
  2268         // [eval] e3.a: conflicting values [a] and {c:a} (mismatched types list and struct):
  2269         //     ./in.cue:412:5
  2270         //     ./in.cue:413:5
  2271  -      c: (_|_){
  2272  -        // [structural cycle] e3.a.c: structural cycle
  2273  -      }
  2274  -      0: (_|_){
  2275  -        // [structural cycle] e3.a.c: structural cycle
  2276  +      c: (_|_){// 〈1;a〉
  2277  +      }
  2278  +      0: (_|_){// 〈1;a〉
  2279         }
  2280       }
  2281       b: (_|_){
  2282  @@ -874,11 +832,9 @@
  2283         // [eval] e3.b: conflicting values [b] and {c:b} (mismatched types list and struct):
  2284         //     ./in.cue:415:5
  2285         //     ./in.cue:416:5
  2286  -      c: (_|_){
  2287  -        // [structural cycle] e3.b.c: structural cycle
  2288  -      }
  2289  -      0: (_|_){
  2290  -        // [structural cycle] e3.b.c: structural cycle
  2291  +      c: (_|_){// 〈1;b〉
  2292  +      }
  2293  +      0: (_|_){// 〈1;b〉
  2294         }
  2295       }
  2296     }
  2297  @@ -892,11 +848,10 @@
  2298           //     ./in.cue:420:10
  2299           //     ./in.cue:421:6
  2300           // e4.a.0.0: 2 errors in empty disjunction:
  2301  -        // e4.a.0.0: conflicting values [[{c:1}]] and {c:1} (mismatched types list and struct):
  2302  -        //     ./in.cue:421:5
  2303  +        // e4.a.0.0: conflicting values [{c:1}] and {c:1} (mismatched types list and struct):
  2304  +        //     ./in.cue:421:6
  2305           //     ./in.cue:421:7
  2306           // e4.a.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
  2307  -        //     ./in.cue:420:6
  2308           //     ./in.cue:420:10
  2309           //     ./in.cue:421:6
  2310           0: (struct){
  2311  @@ -912,12 +867,11 @@
  2312           //     ./in.cue:423:6
  2313           //     ./in.cue:424:10
  2314           // e4.b.0.0: 2 errors in empty disjunction:
  2315  -        // e4.b.0.0: conflicting values [(b|{})] and {c:1} (mismatched types list and struct):
  2316  +        // e4.b.0.0: conflicting values [{c:1}] and {c:1} (mismatched types list and struct):
  2317  +        //     ./in.cue:423:6
  2318           //     ./in.cue:423:7
  2319  -        //     ./in.cue:424:5
  2320           // e4.b.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
  2321           //     ./in.cue:423:6
  2322  -        //     ./in.cue:424:6
  2323           //     ./in.cue:424:10
  2324           0: (struct){
  2325             c: (int){ 1 }
  2326  @@ -945,17 +899,16 @@
  2327           // [eval]
  2328           0: (_|_){
  2329             // [eval] nestedList.v1e.y.0: 4 errors in empty disjunction:
  2330  -          // nestedList.v1e.y.0: conflicting values int and [[2],1] (mismatched types int and list):
  2331  +          // nestedList.v1e.y.0: conflicting values [[2],1] and int (mismatched types list and int):
  2332             //     ./in.cue:438:11
  2333             //     ./in.cue:439:11
  2334             // nestedList.v1e.y.0.0: 2 errors in empty disjunction:
  2335  -          // nestedList.v1e.y.0.0: conflicting values int and [2] (mismatched types int and list):
  2336  +          // nestedList.v1e.y.0.0: conflicting values [2] and int (mismatched types list and int):
  2337             //     ./in.cue:438:11
  2338             //     ./in.cue:439:12
  2339  -          // nestedList.v1e.y.0.0: incompatible list lengths (1 and 2)
  2340  -          0: (#list){
  2341  -            0: (int){ 2 }
  2342  -          }
  2343  +          // nestedList.v1e.y.0.0: incompatible list lengths (1 and 2):
  2344  +          //     ./in.cue:438:6
  2345  +          0: (list){ list }
  2346             1: (int){ 1 }
  2347           }
  2348           1: (int){ 1 }
  2349  @@ -967,17 +920,16 @@
  2350           // [eval]
  2351           0: (_|_){
  2352             // [eval] nestedList.v2e.y.0: 4 errors in empty disjunction:
  2353  -          // nestedList.v2e.y.0: conflicting values int and [[2],1] (mismatched types int and list):
  2354  +          // nestedList.v2e.y.0: conflicting values [[2],1] and int (mismatched types list and int):
  2355             //     ./in.cue:443:11
  2356             //     ./in.cue:444:11
  2357             // nestedList.v2e.y.0.0: 2 errors in empty disjunction:
  2358  -          // nestedList.v2e.y.0.0: conflicting values int and [2] (mismatched types int and list):
  2359  +          // nestedList.v2e.y.0.0: conflicting values [2] and int (mismatched types list and int):
  2360             //     ./in.cue:443:12
  2361             //     ./in.cue:444:11
  2362  -          // nestedList.v2e.y.0.0: incompatible list lengths (1 and 2)
  2363  -          0: (#list){
  2364  -            0: (int){ 2 }
  2365  -          }
  2366  +          // nestedList.v2e.y.0.0: incompatible list lengths (1 and 2):
  2367  +          //     ./in.cue:444:6
  2368  +          0: (list){ list }
  2369             1: (int){ 1 }
  2370           }
  2371           1: (int){ 1 }
  2372  @@ -1031,7 +983,10 @@
  2373           head: (int){ 3 }
  2374           tail: (struct){
  2375             head: (int){ 4 }
  2376  -          tail: (null){ null }
  2377  +          tail: ((null|struct)){ |((struct){
  2378  +              head: (int){ int }
  2379  +              tail: (null){ null }
  2380  +            }, (null){ null }) }
  2381           }
  2382         }
  2383       }
  2384  @@ -1045,7 +1000,10 @@
  2385         head: (int){ 2 }
  2386         tail: (struct){
  2387           head: (int){ 3 }
  2388  -        tail: (int){ 1 }
  2389  +        tail: ((int|struct)){ |((struct){
  2390  +            head: (int){ int }
  2391  +            tail: (int){ 1 }
  2392  +          }, (int){ 1 }) }
  2393         }
  2394       }
  2395     }
  2396  @@ -1059,8 +1017,12 @@
  2397         head: (int){ 2 }
  2398         tail: (struct){ |((struct){
  2399             head: (int){ 3 }
  2400  -          tail: (struct){
  2401  -          }
  2402  +          tail: (struct){ |((struct){
  2403  +              head: (int){ int }
  2404  +              tail: (struct){
  2405  +              }
  2406  +            }, (struct){
  2407  +            }) }
  2408           }, (struct){
  2409             head: (int){ 3 }
  2410           }) }
  2411  @@ -1082,9 +1044,7 @@
  2412         // [structural cycle]
  2413         f: (_|_){
  2414           // [structural cycle]
  2415  -        h: (_|_){
  2416  -          // [structural cycle] z1.z.f.h: structural cycle
  2417  -        }
  2418  +        h: ~(z1.z.g)
  2419         }
  2420         g: (_|_){
  2421           // [structural cycle]
  2422  @@ -1105,10 +1065,7 @@
  2423             x: (_){ _ }
  2424             y: (_){ _ }
  2425           }
  2426  -        y: (struct){
  2427  -          x: (_){ _ }
  2428  -          y: (_){ _ }
  2429  -        }
  2430  +        y: ~(crossRefNoCycle.t1.C.x)
  2431         }
  2432       }
  2433       t2: (struct){
  2434  @@ -1121,10 +1078,7 @@
  2435             x: (_){ _ }
  2436             y: (_){ _ }
  2437           }
  2438  -        y: (struct){
  2439  -          x: (_){ _ }
  2440  -          y: (_){ _ }
  2441  -        }
  2442  +        y: ~(crossRefNoCycle.t2.C.x)
  2443         }
  2444       }
  2445       t3: (struct){
  2446  @@ -1139,16 +1093,8 @@
  2447             y: (_){ _ }
  2448             z: (_){ _ }
  2449           }
  2450  -        y: (struct){
  2451  -          x: (_){ _ }
  2452  -          y: (_){ _ }
  2453  -          z: (_){ _ }
  2454  -        }
  2455  -        z: (struct){
  2456  -          x: (_){ _ }
  2457  -          y: (_){ _ }
  2458  -          z: (_){ _ }
  2459  -        }
  2460  +        y: ~(crossRefNoCycle.t3.C.x)
  2461  +        z: ~(crossRefNoCycle.t3.C.x)
  2462         }
  2463       }
  2464       t4: (struct){
  2465  @@ -1164,51 +1110,11 @@
  2466               y: (_){ _ }
  2467               z: (_){ _ }
  2468             }
  2469  -          y: (struct){
  2470  -            x: (_){ _ }
  2471  -            y: (_){ _ }
  2472  -            z: (_){ _ }
  2473  -          }
  2474  -          z: (struct){
  2475  -            x: (_){ _ }
  2476  -            y: (_){ _ }
  2477  -            z: (_){ _ }
  2478  -          }
  2479  -        }
  2480  -        y: (struct){
  2481  -          x: (struct){
  2482  -            x: (_){ _ }
  2483  -            y: (_){ _ }
  2484  -            z: (_){ _ }
  2485  -          }
  2486  -          y: (struct){
  2487  -            x: (_){ _ }
  2488  -            y: (_){ _ }
  2489  -            z: (_){ _ }
  2490  -          }
  2491  -          z: (struct){
  2492  -            x: (_){ _ }
  2493  -            y: (_){ _ }
  2494  -            z: (_){ _ }
  2495  -          }
  2496  -        }
  2497  -        z: (struct){
  2498  -          x: (struct){
  2499  -            x: (_){ _ }
  2500  -            y: (_){ _ }
  2501  -            z: (_){ _ }
  2502  -          }
  2503  -          y: (struct){
  2504  -            x: (_){ _ }
  2505  -            y: (_){ _ }
  2506  -            z: (_){ _ }
  2507  -          }
  2508  -          z: (struct){
  2509  -            x: (_){ _ }
  2510  -            y: (_){ _ }
  2511  -            z: (_){ _ }
  2512  -          }
  2513  -        }
  2514  +          y: ~(crossRefNoCycle.t4.C.x.x)
  2515  +          z: ~(crossRefNoCycle.t4.C.x.x)
  2516  +        }
  2517  +        y: ~(crossRefNoCycle.t4.C.x)
  2518  +        z: ~(crossRefNoCycle.t4.C.x)
  2519         }
  2520       }
  2521       t5: (struct){
  2522  @@ -1219,18 +1125,8 @@
  2523           }
  2524         }
  2525         C: (struct){
  2526  -        y: (struct){
  2527  -          y: (_|_){
  2528  -            // [incomplete] crossRefNoCycle.t5.C.y.y: undefined field: x:
  2529  -            //     ./in.cue:556:8
  2530  -          }
  2531  -        }
  2532  -        x: (struct){
  2533  -          y: (_|_){
  2534  -            // [incomplete] crossRefNoCycle.t5.C.x.y: undefined field: x:
  2535  -            //     ./in.cue:556:8
  2536  -          }
  2537  -        }
  2538  +        x: ~(crossRefNoCycle.t5.T)
  2539  +        y: ~(crossRefNoCycle.t5.T)
  2540         }
  2541       }
  2542     }
  2543  @@ -1253,19 +1149,19 @@
  2544       }
  2545     }
  2546     n4: (struct){
  2547  -    a: (struct){
  2548  -      b: (int){ int }
  2549  -    }
  2550  -    x: (struct){
  2551  -      a: (struct){
  2552  -        b: (int){ int }
  2553  -      }
  2554  -      y: (struct){
  2555  +    x: (struct){
  2556  +      y: (struct){
  2557  +        z: (int){ int }
  2558           a: (struct){
  2559             b: (int){ int }
  2560           }
  2561  -        z: (int){ int }
  2562  -      }
  2563  +      }
  2564  +      a: (struct){
  2565  +        b: (int){ int }
  2566  +      }
  2567  +    }
  2568  +    a: (struct){
  2569  +      b: (int){ int }
  2570       }
  2571     }
  2572   }
  2573  -- diff/todo/p2 --
  2574  Investigate differing counts for empty disjunction errors.
  2575  fieldsSumInfinite.issue3310.3: path missing in error
  2576  b7.b.0.0.0: cycle too deep before detection.
  2577  TODO(share): fix the following bug once we have structure sharing.
  2578  p3.a.a: field not allowed incorrect?
  2579  -- diff/todo/p3 --
  2580  n4: Reordering.
  2581  b12b: reported at correct level, but investigate if it is not processing
  2582      too deep anyway.
  2583  -- diff/explanation --
  2584  Structural cycles are reported in all chains. compared to old implementation.
  2585  b4.b: Structural error converted to eval error: there is both a structural and
  2586     eval error at this field. The newly reported error is correct.
  2587  b7.b.0.0: structural cycle nested one too deep: the eval error takes precedence.
  2588     The cycle is reported at the correct level according to the spec.
  2589  b10.c.d: position now allows b: string as well. This is correct. This is mostly
  2590     a representational issue, as the evaluator would still accept such values
  2591     when merged, but it is still useful.
  2592  fieldsSumInfinite.issue3310: evalv3 correctly spots a structural cycle,
  2593     where evalv2 computes an incorrect result without erroring.
  2594  issue2545: a regression in evalv2 around v0.6 is fixed in evalv3.
  2595  -- out/eval --
  2596  Errors:
  2597  a1.f.0: structural cycle
  2598  a3.f.g: structural cycle
  2599  b12b.#list.tail: structural cycle
  2600  b13.root.a.0.0: structural cycle
  2601  b14.root.b.1.1: structural cycle
  2602  b4.cond1.x.y.0: structural cycle
  2603  b4.cond2.x.y.0: structural cycle
  2604  b4.x.y.0: structural cycle
  2605  b6.b.a.0: conflicting values 1 and [1] (mismatched types int and list):
  2606      ./in.cue:94:5
  2607      ./in.cue:94:13
  2608      ./in.cue:94:14
  2609      ./in.cue:95:9
  2610  b6.b.a.0.0: structural cycle
  2611  b6.x.a.0: structural cycle
  2612  b7.a.0: structural cycle
  2613  c1.a.c.c: structural cycle
  2614  d1.a.b.c.d.t: structural cycle
  2615  d2.a.b.c.d.t: structural cycle
  2616  d2.r.c.d.t: structural cycle
  2617  d3.x.a.b.c: structural cycle
  2618  e1.a.c: structural cycle
  2619  e1.b.c: structural cycle
  2620  e2.a.c: structural cycle
  2621  e2.b.c: structural cycle
  2622  e3.a: conflicting values [a] and {c:a} (mismatched types list and struct):
  2623      ./in.cue:412:5
  2624      ./in.cue:413:5
  2625  e3.a.c: structural cycle
  2626  e3.b: conflicting values [b] and {c:b} (mismatched types list and struct):
  2627      ./in.cue:415:5
  2628      ./in.cue:416:5
  2629  e3.b.c: structural cycle
  2630  e4.a.0: 4 errors in empty disjunction:
  2631  e4.a.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
  2632      ./in.cue:420:10
  2633      ./in.cue:421:6
  2634  e4.a.0.0: 2 errors in empty disjunction:
  2635  e4.a.0.0: conflicting values [[{c:1}]] and {c:1} (mismatched types list and struct):
  2636      ./in.cue:421:5
  2637      ./in.cue:421:7
  2638  e4.a.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
  2639      ./in.cue:420:6
  2640      ./in.cue:420:10
  2641      ./in.cue:421:6
  2642  e4.b.0: 4 errors in empty disjunction:
  2643  e4.b.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
  2644      ./in.cue:423:6
  2645      ./in.cue:424:10
  2646  e4.b.0.0: 2 errors in empty disjunction:
  2647  e4.b.0.0: conflicting values [(b|{})] and {c:1} (mismatched types list and struct):
  2648      ./in.cue:423:7
  2649      ./in.cue:424:5
  2650  e4.b.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
  2651      ./in.cue:423:6
  2652      ./in.cue:424:6
  2653      ./in.cue:424:10
  2654  issue2545.#B.A: structural cycle
  2655  nestedList.v1e.y.0: 4 errors in empty disjunction:
  2656  nestedList.v1e.y.0: conflicting values int and [[2],1] (mismatched types int and list):
  2657      ./in.cue:438:11
  2658      ./in.cue:439:11
  2659  nestedList.v1e.y.0.0: 2 errors in empty disjunction:
  2660  nestedList.v1e.y.0.0: conflicting values int and [2] (mismatched types int and list):
  2661      ./in.cue:438:11
  2662      ./in.cue:439:12
  2663  nestedList.v1e.y.0.0: incompatible list lengths (1 and 2)
  2664  nestedList.v2e.y.0: 4 errors in empty disjunction:
  2665  nestedList.v2e.y.0: conflicting values int and [[2],1] (mismatched types int and list):
  2666      ./in.cue:443:11
  2667      ./in.cue:444:11
  2668  nestedList.v2e.y.0.0: 2 errors in empty disjunction:
  2669  nestedList.v2e.y.0.0: conflicting values int and [2] (mismatched types int and list):
  2670      ./in.cue:443:12
  2671      ./in.cue:444:11
  2672  nestedList.v2e.y.0.0: incompatible list lengths (1 and 2)
  2673  p2.#T.a.b.link: structural cycle
  2674  p3.#U.#T.a.b.link: structural cycle
  2675  p5.#T.a.0.link: structural cycle
  2676  p6.#U.#T.a.0.link: structural cycle
  2677  patternFail.issue2374.a.b: structural cycle
  2678  resolveToAncestor.t2.X.b: structural cycle
  2679  shortPathFail.elipsis.t2.Foo.ref.ref: structural cycle
  2680  withLetFail.schema.next: structural cycle
  2681  z1.z.f.h: structural cycle
  2682  z1.z.g.h: structural cycle
  2683  resolveToAncestor.t1.X.b: structural cycle:
  2684      ./edge.cue:3:6
  2685  d1.r: structural cycle:
  2686      ./in.cue:301:26
  2687  d3.x.indirect: structural cycle:
  2688      ./in.cue:316:12
  2689  
  2690  Result:
  2691  (_|_){
  2692    // [eval]
  2693    resolveToAncestor: (_|_){
  2694      // [structural cycle]
  2695      t1: (_|_){
  2696        // [structural cycle]
  2697        X: (_|_){
  2698          // [structural cycle]
  2699          a: (_|_){
  2700            // [structural cycle] resolveToAncestor.t1.X.b: structural cycle:
  2701            //     ./edge.cue:3:6
  2702          }
  2703          b: (_|_){
  2704            // [structural cycle] resolveToAncestor.t1.X.b: structural cycle:
  2705            //     ./edge.cue:3:6
  2706          }
  2707        }
  2708      }
  2709      t2: (_|_){
  2710        // [structural cycle]
  2711        X: (_|_){
  2712          // [structural cycle]
  2713          b: (_|_){
  2714            // [structural cycle] resolveToAncestor.t2.X.b: structural cycle
  2715          }
  2716          a: (_|_){
  2717            // [structural cycle] resolveToAncestor.t2.X.b: structural cycle
  2718          }
  2719        }
  2720      }
  2721    }
  2722    a1: (_|_){
  2723      // [structural cycle]
  2724      f: (_|_){
  2725        // [structural cycle]
  2726        0: (_|_){
  2727          // [structural cycle] a1.f.0: structural cycle
  2728        }
  2729      }
  2730    }
  2731    a2: (struct){
  2732      f: (_){ _ }
  2733    }
  2734    a3: (_|_){
  2735      // [structural cycle]
  2736      f: (_|_){
  2737        // [structural cycle]
  2738        g: (_|_){
  2739          // [structural cycle] a3.f.g: structural cycle
  2740        }
  2741      }
  2742    }
  2743    a4: (struct){
  2744      a: (#list){
  2745        0: (int){ int }
  2746      }
  2747    }
  2748    a5: (struct){
  2749      a: (struct){
  2750        b: (int){ int }
  2751      }
  2752    }
  2753    a6: (struct){
  2754      a: (_){ |((_){ _ }, (int){ int }) }
  2755    }
  2756    a7: (struct){
  2757      a: (string){ "foo" }
  2758      b: (struct){
  2759        x: (struct){
  2760          x: (string){ "foo" }
  2761          y: (int){ 3 }
  2762        }
  2763        y: (string){ "foo" }
  2764      }
  2765      c: (struct){
  2766        x: (string){ "foo" }
  2767        y: (int){ 3 }
  2768      }
  2769    }
  2770    b1: (struct){
  2771      b: (#list){
  2772        0: (int){ 1 }
  2773      }
  2774      a: (#list){
  2775        0: (int){ int }
  2776      }
  2777    }
  2778    b2: (struct){
  2779      a: (#list){
  2780        0: (int){ int }
  2781      }
  2782      b: (#list){
  2783        0: (int){ 1 }
  2784      }
  2785    }
  2786    b3: (struct){
  2787      x: (struct){
  2788        a: (#list){
  2789          0: (int){ int }
  2790        }
  2791      }
  2792      b: (struct){
  2793        a: (#list){
  2794          0: (int){ 1 }
  2795        }
  2796      }
  2797    }
  2798    b4: (_|_){
  2799      // [structural cycle]
  2800      b: (_|_){
  2801        // [structural cycle]
  2802        0: (_|_){
  2803          // [structural cycle] b4.x.y.0: structural cycle
  2804        }
  2805      }
  2806      x: (_|_){
  2807        // [structural cycle]
  2808        y: (_|_){
  2809          // [structural cycle]
  2810          0: (_|_){
  2811            // [structural cycle] b4.x.y.0: structural cycle
  2812          }
  2813        }
  2814      }
  2815      cond1: (_|_){
  2816        // [structural cycle]
  2817        b: (#list){
  2818          _z: (bool){ false }
  2819          0: (int){ 1 }
  2820        }
  2821        x: (_|_){
  2822          // [structural cycle]
  2823          y: (_|_){
  2824            // [structural cycle]
  2825            _z: (bool){ |(*(bool){ true }, (bool){ bool }) }
  2826            0: (_|_){
  2827              // [structural cycle] b4.cond1.x.y.0: structural cycle
  2828            }
  2829          }
  2830        }
  2831      }
  2832      cond2: (_|_){
  2833        // [structural cycle]
  2834        x: (_|_){
  2835          // [structural cycle]
  2836          y: (_|_){
  2837            // [structural cycle]
  2838            _z: (bool){ |(*(bool){ true }, (bool){ bool }) }
  2839            0: (_|_){
  2840              // [structural cycle] b4.cond2.x.y.0: structural cycle
  2841            }
  2842          }
  2843        }
  2844        b: (_|_){
  2845          // [structural cycle] b4.cond2.x.y.0: structural cycle
  2846        }
  2847      }
  2848    }
  2849    b5: (struct){
  2850      b: (struct){
  2851        a: (#list){
  2852          0: (int){ 1 }
  2853        }
  2854      }
  2855      x: (struct){
  2856        y: (struct){
  2857          a: (#list){
  2858            0: (int){ int }
  2859          }
  2860        }
  2861      }
  2862    }
  2863    b6: (_|_){
  2864      // [eval]
  2865      b: (_|_){
  2866        // [eval]
  2867        a: (_|_){
  2868          // [eval]
  2869          0: (_|_){
  2870            // [eval] b6.b.a.0: conflicting values 1 and [1] (mismatched types int and list):
  2871            //     ./in.cue:94:5
  2872            //     ./in.cue:94:13
  2873            //     ./in.cue:94:14
  2874            //     ./in.cue:95:9
  2875            0: (_|_){
  2876              // [structural cycle] b6.b.a.0.0: structural cycle
  2877            }
  2878          }
  2879        }
  2880      }
  2881      x: (_|_){
  2882        // [structural cycle]
  2883        a: (_|_){
  2884          // [structural cycle]
  2885          0: (_|_){
  2886            // [structural cycle] b6.x.a.0: structural cycle
  2887          }
  2888        }
  2889      }
  2890    }
  2891    b7: (_|_){
  2892      // [structural cycle]
  2893      b: (_|_){
  2894        // [structural cycle]
  2895        0: (_|_){
  2896          // [structural cycle] b7.a.0: structural cycle
  2897        }
  2898      }
  2899      a: (_|_){
  2900        // [structural cycle]
  2901        0: (_|_){
  2902          // [structural cycle] b7.a.0: structural cycle
  2903        }
  2904      }
  2905    }
  2906    b8: (struct){
  2907      x: (struct){
  2908        f: (string){ string }
  2909      }
  2910      a: (struct){
  2911        f: (string){ string }
  2912      }
  2913      b: (string){ string }
  2914    }
  2915    b9: (struct){
  2916      #a: ((string|struct)){ |((string){ string }, (#struct){
  2917          ref: (string){ string }
  2918        }) }
  2919      #b: (#struct){
  2920        c: (#list){
  2921          0: ((string|struct)){ |((string){ string }, (#struct){
  2922              ref: (string){ string }
  2923            }) }
  2924          1: ((string|struct)){ |((string){ string }, (#struct){
  2925              ref: (string){ string }
  2926            }) }
  2927          2: ((string|struct)){ |((string){ string }, (#struct){
  2928              ref: (string){ string }
  2929            }) }
  2930        }
  2931      }
  2932      #ref: (#struct){
  2933        ref: (string){ string }
  2934      }
  2935      x: (#struct){ |((#struct){
  2936          c: (#list){
  2937            0: ((string|struct)){ |((string){ string }, (#struct){
  2938                ref: (string){ string }
  2939              }) }
  2940            1: ((string|struct)){ |((string){ string }, (#struct){
  2941                ref: (string){ string }
  2942              }) }
  2943            2: ((string|struct)){ |((string){ string }, (#struct){
  2944                ref: (string){ string }
  2945              }) }
  2946          }
  2947        }, (#struct){
  2948          ref: (string){ string }
  2949        }) }
  2950    }
  2951    b10: (struct){
  2952      a: (#struct){
  2953        b: ((string|struct)){ |((string){ string }, (#struct){
  2954            d: (string){ string }
  2955          }) }
  2956      }
  2957      c: (#struct){
  2958        d: (string){ string }
  2959      }
  2960      d: (struct){
  2961        d: (struct){
  2962          b: (string){ string }
  2963        }
  2964      }
  2965    }
  2966    b11: (struct){
  2967      #list: (#struct){
  2968        tail: ((null|struct)){ |(*(null){ null }, (#struct){
  2969            tail: (null){ null }
  2970          }) }
  2971      }
  2972    }
  2973    b12: (struct){
  2974      #list: (#struct){
  2975        value: (int){ int }
  2976        tail: (null){ null }
  2977        sum: (int){ int }
  2978      }
  2979      list1: (#struct){
  2980        value: (int){ 1 }
  2981        tail: (#struct){
  2982          value: (int){ 2 }
  2983          tail: (#struct){
  2984            value: (int){ 3 }
  2985            tail: (#struct){
  2986              value: (int){ 4 }
  2987              tail: (null){ null }
  2988              sum: (int){ 4 }
  2989            }
  2990            sum: (int){ 7 }
  2991          }
  2992          sum: (int){ 9 }
  2993        }
  2994        sum: (int){ 10 }
  2995      }
  2996    }
  2997    b12b: (_|_){
  2998      // [structural cycle]
  2999      #list: (_|_){
  3000        // [structural cycle] b12b.#list.tail: structural cycle
  3001      }
  3002      list1: (_|_){
  3003        // [structural cycle] b12b.#list.tail: structural cycle
  3004      }
  3005    }
  3006    b13: (_|_){
  3007      // [structural cycle]
  3008      root: (_|_){
  3009        // [structural cycle]
  3010        a: (_|_){
  3011          // [structural cycle]
  3012          0: (_|_){
  3013            // [structural cycle]
  3014            0: (_|_){
  3015              // [structural cycle] b13.root.a.0.0: structural cycle
  3016            }
  3017          }
  3018        }
  3019      }
  3020    }
  3021    b14: (_|_){
  3022      // [structural cycle]
  3023      root: (_|_){
  3024        // [structural cycle]
  3025        a: (list){
  3026        }
  3027        b: (_|_){
  3028          // [structural cycle]
  3029          0: (list){
  3030          }
  3031          1: (_|_){
  3032            // [structural cycle]
  3033            0: (list){
  3034            }
  3035            1: (_|_){
  3036              // [structural cycle] b14.root.b.1.1: structural cycle
  3037            }
  3038          }
  3039        }
  3040      }
  3041    }
  3042    b15: (struct){
  3043      root: (struct){
  3044        a: (struct){
  3045        }
  3046      }
  3047    }
  3048    p1: (struct){
  3049      #T: (#struct){
  3050        a: (#struct){
  3051        }
  3052      }
  3053      a: (#struct){
  3054        a: (#struct){
  3055          one: (#struct){
  3056            link: (#struct){
  3057              a: (#struct){
  3058                two: (#struct){
  3059                  link: (#struct){
  3060                    a: (#struct){
  3061                    }
  3062                  }
  3063                }
  3064              }
  3065            }
  3066          }
  3067        }
  3068      }
  3069    }
  3070    p2: (_|_){
  3071      // [structural cycle]
  3072      #T: (_|_){
  3073        // [structural cycle]
  3074        a: (_|_){
  3075          // [structural cycle]
  3076          b: (_|_){
  3077            // [structural cycle]
  3078            link: (_|_){
  3079              // [structural cycle] p2.#T.a.b.link: structural cycle
  3080            }
  3081          }
  3082        }
  3083      }
  3084      a: (_|_){
  3085        // [structural cycle]
  3086        a: (struct){
  3087          one: (struct){
  3088            link: (struct){
  3089              a: (struct){
  3090                two: (struct){
  3091                }
  3092              }
  3093            }
  3094          }
  3095        }
  3096      }
  3097    }
  3098    p3: (_|_){
  3099      // [structural cycle]
  3100      #S: (#struct){
  3101        #T: (#struct){
  3102          a: (#struct){
  3103          }
  3104        }
  3105      }
  3106      #U: (_|_){
  3107        // [structural cycle]
  3108        #T: (_|_){
  3109          // [structural cycle]
  3110          a: (_|_){
  3111            // [structural cycle]
  3112            b: (_|_){
  3113              // [structural cycle]
  3114              link: (_|_){
  3115                // [structural cycle] p3.#U.#T.a.b.link: structural cycle
  3116              }
  3117            }
  3118          }
  3119        }
  3120      }
  3121      a: (_|_){
  3122        // [structural cycle] p3.#U.#T.a.b.link: structural cycle
  3123      }
  3124    }
  3125    p4: (struct){
  3126      #T: (#struct){
  3127        a: (list){
  3128        }
  3129      }
  3130      a: (#struct){
  3131        a: (#list){
  3132          0: (#struct){
  3133            link: (#struct){
  3134              a: (#list){
  3135                0: (#struct){
  3136                  link: (#struct){
  3137                    a: (list){
  3138                    }
  3139                  }
  3140                }
  3141              }
  3142            }
  3143          }
  3144        }
  3145      }
  3146    }
  3147    p5: (_|_){
  3148      // [structural cycle]
  3149      #T: (_|_){
  3150        // [structural cycle]
  3151        a: (_|_){
  3152          // [structural cycle]
  3153          0: (_|_){
  3154            // [structural cycle]
  3155            link: (_|_){
  3156              // [structural cycle] p5.#T.a.0.link: structural cycle
  3157            }
  3158          }
  3159        }
  3160      }
  3161      a: (_|_){
  3162        // [structural cycle]
  3163        a: (#list){
  3164          0: (struct){
  3165            link: (struct){
  3166              a: (#list){
  3167                0: (struct){
  3168                }
  3169              }
  3170            }
  3171          }
  3172        }
  3173      }
  3174    }
  3175    p6: (_|_){
  3176      // [structural cycle]
  3177      #S: (#struct){
  3178        #T: (#struct){
  3179          a: (list){
  3180          }
  3181        }
  3182      }
  3183      #U: (_|_){
  3184        // [structural cycle]
  3185        #T: (_|_){
  3186          // [structural cycle]
  3187          a: (_|_){
  3188            // [structural cycle]
  3189            0: (_|_){
  3190              // [structural cycle]
  3191              link: (_|_){
  3192                // [structural cycle] p6.#U.#T.a.0.link: structural cycle
  3193              }
  3194            }
  3195          }
  3196        }
  3197      }
  3198      a: (_|_){
  3199        // [structural cycle] p6.#U.#T.a.0.link: structural cycle
  3200      }
  3201    }
  3202    c1: (_|_){
  3203      // [structural cycle]
  3204      a: (_|_){
  3205        // [structural cycle]
  3206        b: (struct){
  3207        }
  3208        c: (_|_){
  3209          // [structural cycle]
  3210          b: (struct){
  3211          }
  3212          c: (_|_){
  3213            // [structural cycle] c1.a.c.c: structural cycle
  3214          }
  3215        }
  3216      }
  3217    }
  3218    d1: (_|_){
  3219      // [structural cycle]
  3220      a: (_|_){
  3221        // [structural cycle]
  3222        b: (_|_){
  3223          // [structural cycle]
  3224          c: (_|_){
  3225            // [structural cycle]
  3226            d: (_|_){
  3227              // [structural cycle]
  3228              h: (int){ int }
  3229              t: (_|_){
  3230                // [structural cycle] d1.a.b.c.d.t: structural cycle
  3231              }
  3232            }
  3233          }
  3234        }
  3235      }
  3236      r: (_|_){
  3237        // [structural cycle] d1.r: structural cycle:
  3238        //     ./in.cue:301:26
  3239      }
  3240      x: (_|_){
  3241        // [structural cycle] d1.a.b.c.d.t: structural cycle
  3242      }
  3243    }
  3244    d2: (_|_){
  3245      // [structural cycle]
  3246      x: (_|_){
  3247        // [structural cycle]
  3248        d: (_|_){
  3249          // [structural cycle]
  3250          h: (int){ int }
  3251          t: (_|_){
  3252            // [structural cycle]
  3253          }
  3254        }
  3255      }
  3256      r: (_|_){
  3257        // [structural cycle]
  3258        c: (_|_){
  3259          // [structural cycle]
  3260          d: (_|_){
  3261            // [structural cycle]
  3262            h: (int){ int }
  3263            t: (_|_){
  3264              // [structural cycle] d2.r.c.d.t: structural cycle
  3265            }
  3266          }
  3267        }
  3268      }
  3269      a: (struct){
  3270        b: (struct){
  3271          c: (_|_){
  3272            // [structural cycle]
  3273            d: (_|_){
  3274              // [structural cycle]
  3275              h: (int){ int }
  3276              t: (_|_){
  3277                // [structural cycle] d2.a.b.c.d.t: structural cycle
  3278              }
  3279            }
  3280          }
  3281        }
  3282      }
  3283    }
  3284    d3: (_|_){
  3285      // [structural cycle]
  3286      config: (struct){
  3287        a: (struct){
  3288          b: (struct){
  3289            c: (null){ null }
  3290          }
  3291        }
  3292        indirect: (null){ null }
  3293        i: (int){ |(*(int){ 1 }, (int){ int }) }
  3294      }
  3295      x: (_|_){
  3296        // [structural cycle]
  3297        a: (_|_){
  3298          // [structural cycle]
  3299          b: (_|_){
  3300            // [structural cycle]
  3301            c: (_|_){
  3302              // [structural cycle] d3.x.a.b.c: structural cycle
  3303            }
  3304          }
  3305        }
  3306        indirect: (_|_){
  3307          // [structural cycle] d3.x.indirect: structural cycle:
  3308          //     ./in.cue:316:12
  3309        }
  3310        i: (int){ 0 }
  3311      }
  3312    }
  3313    shortPathFail: (_|_){
  3314      // [structural cycle]
  3315      doubleRef: (struct){
  3316        a: (#struct){
  3317          Next: (null){ null }
  3318        }
  3319        #List: (#struct){
  3320          Next: (null){ null }
  3321        }
  3322      }
  3323      elipsis: (_|_){
  3324        // [structural cycle]
  3325        t1: (struct){
  3326          #Foo: (#struct){
  3327            ref: ((null|struct)){ |((null){ null }, (#struct){
  3328                ref: (null){ null }
  3329              }) }
  3330          }
  3331        }
  3332        t2: (_|_){
  3333          // [structural cycle]
  3334          Foo: (_|_){
  3335            // [structural cycle]
  3336            ref: (_|_){
  3337              // [structural cycle]
  3338              ref: (_|_){
  3339                // [structural cycle] shortPathFail.elipsis.t2.Foo.ref.ref: structural cycle
  3340              }
  3341            }
  3342          }
  3343        }
  3344      }
  3345      comprehension: (struct){
  3346        #list: (#struct){
  3347          tail: ((null|struct)){ |(*(null){ null }, (#struct){
  3348              tail: (null){ null }
  3349            }) }
  3350        }
  3351      }
  3352    }
  3353    patternFail: (_|_){
  3354      // [structural cycle]
  3355      issue2374: (_|_){
  3356        // [structural cycle]
  3357        a: (_|_){
  3358          // [structural cycle]
  3359          r: (int){ 0 }
  3360          b: (_|_){
  3361            // [structural cycle] patternFail.issue2374.a.b: structural cycle
  3362          }
  3363        }
  3364      }
  3365    }
  3366    withLetFail: (_|_){
  3367      // [structural cycle]
  3368      schema: (_|_){
  3369        // [structural cycle]
  3370        next: (_|_){
  3371          // [structural cycle] withLetFail.schema.next: structural cycle
  3372        }
  3373      }
  3374      let _schema_1#1 = (_|_){
  3375        // [structural cycle] withLetFail._schema_1: structural cycle:
  3376        //     ./in.cue:362:17
  3377      }
  3378    }
  3379    fieldsSumInfinite: (_|_){
  3380      // [structural cycle]
  3381      issue3310: (_|_){
  3382        // [structural cycle]
  3383        cheeseburger: (float){ 3.00 }
  3384        fries: (float){ 2.00 }
  3385        sprite: (float){ 1.00 }
  3386        total: (_|_){
  3387          // [structural cycle]
  3388        }
  3389      }
  3390    }
  3391    listOptOK: (struct){
  3392      list: (struct){
  3393        head: (int){ int }
  3394        tail?: (_|_){
  3395          // [structural cycle] listOptOK.list.tail: structural cycle
  3396        }
  3397      }
  3398      a: (struct){
  3399        head: (int){ 3 }
  3400        tail: (struct){
  3401          head: (int){ 2 }
  3402          tail?: (_|_){
  3403            // [structural cycle] listOptOK.a.tail.tail: structural cycle
  3404          }
  3405        }
  3406      }
  3407    }
  3408    issue2545: (_|_){
  3409      // [structural cycle]
  3410      #A: (#struct){
  3411        B?: (_|_){
  3412          // [structural cycle]
  3413          A: (_|_){
  3414            // [structural cycle] issue2545.#A.B.A: structural cycle
  3415          }
  3416        }
  3417      }
  3418      #B: (_|_){
  3419        // [structural cycle]
  3420        A: (_|_){
  3421          // [structural cycle] issue2545.#B.A: structural cycle
  3422        }
  3423      }
  3424    }
  3425    e1: (_|_){
  3426      // [structural cycle]
  3427      a: (_|_){
  3428        // [structural cycle]
  3429        c: (_|_){
  3430          // [structural cycle] e1.a.c: structural cycle
  3431        }
  3432      }
  3433      b: (_|_){
  3434        // [structural cycle]
  3435        c: (_|_){
  3436          // [structural cycle] e1.b.c: structural cycle
  3437        }
  3438      }
  3439    }
  3440    e2: (_|_){
  3441      // [structural cycle]
  3442      a: (_|_){
  3443        // [structural cycle]
  3444        c: (_|_){
  3445          // [structural cycle] e2.a.c: structural cycle
  3446        }
  3447      }
  3448      b: (_|_){
  3449        // [structural cycle]
  3450        c: (_|_){
  3451          // [structural cycle] e2.b.c: structural cycle
  3452        }
  3453      }
  3454    }
  3455    e3: (_|_){
  3456      // [eval]
  3457      a: (_|_){
  3458        // [eval] e3.a: conflicting values [a] and {c:a} (mismatched types list and struct):
  3459        //     ./in.cue:412:5
  3460        //     ./in.cue:413:5
  3461        c: (_|_){
  3462          // [structural cycle] e3.a.c: structural cycle
  3463        }
  3464        0: (_|_){
  3465          // [structural cycle] e3.a.c: structural cycle
  3466        }
  3467      }
  3468      b: (_|_){
  3469        // [eval] e3.b: conflicting values [b] and {c:b} (mismatched types list and struct):
  3470        //     ./in.cue:415:5
  3471        //     ./in.cue:416:5
  3472        c: (_|_){
  3473          // [structural cycle] e3.b.c: structural cycle
  3474        }
  3475        0: (_|_){
  3476          // [structural cycle] e3.b.c: structural cycle
  3477        }
  3478      }
  3479    }
  3480    e4: (_|_){
  3481      // [eval]
  3482      a: (_|_){
  3483        // [eval]
  3484        0: (_|_){
  3485          // [eval] e4.a.0: 4 errors in empty disjunction:
  3486          // e4.a.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
  3487          //     ./in.cue:420:10
  3488          //     ./in.cue:421:6
  3489          // e4.a.0.0: 2 errors in empty disjunction:
  3490          // e4.a.0.0: conflicting values [[{c:1}]] and {c:1} (mismatched types list and struct):
  3491          //     ./in.cue:421:5
  3492          //     ./in.cue:421:7
  3493          // e4.a.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
  3494          //     ./in.cue:420:6
  3495          //     ./in.cue:420:10
  3496          //     ./in.cue:421:6
  3497          0: (struct){
  3498            c: (int){ 1 }
  3499          }
  3500        }
  3501      }
  3502      b: (_|_){
  3503        // [eval]
  3504        0: (_|_){
  3505          // [eval] e4.b.0: 4 errors in empty disjunction:
  3506          // e4.b.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
  3507          //     ./in.cue:423:6
  3508          //     ./in.cue:424:10
  3509          // e4.b.0.0: 2 errors in empty disjunction:
  3510          // e4.b.0.0: conflicting values [(b|{})] and {c:1} (mismatched types list and struct):
  3511          //     ./in.cue:423:7
  3512          //     ./in.cue:424:5
  3513          // e4.b.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
  3514          //     ./in.cue:423:6
  3515          //     ./in.cue:424:6
  3516          //     ./in.cue:424:10
  3517          0: (struct){
  3518            c: (int){ 1 }
  3519          }
  3520        }
  3521      }
  3522    }
  3523    e5: (struct){
  3524      a: (struct){
  3525        c: (int){ int }
  3526      }
  3527      b: (struct){
  3528        c: (int){ int }
  3529      }
  3530    }
  3531    nestedList: (_|_){
  3532      // [eval]
  3533      v1e: (_|_){
  3534        // [eval]
  3535        x: (#list){
  3536          0: (int){ int }
  3537          1: (int){ 1 }
  3538        }
  3539        y: (_|_){
  3540          // [eval]
  3541          0: (_|_){
  3542            // [eval] nestedList.v1e.y.0: 4 errors in empty disjunction:
  3543            // nestedList.v1e.y.0: conflicting values int and [[2],1] (mismatched types int and list):
  3544            //     ./in.cue:438:11
  3545            //     ./in.cue:439:11
  3546            // nestedList.v1e.y.0.0: 2 errors in empty disjunction:
  3547            // nestedList.v1e.y.0.0: conflicting values int and [2] (mismatched types int and list):
  3548            //     ./in.cue:438:11
  3549            //     ./in.cue:439:12
  3550            // nestedList.v1e.y.0.0: incompatible list lengths (1 and 2)
  3551            0: (#list){
  3552              0: (int){ 2 }
  3553            }
  3554            1: (int){ 1 }
  3555          }
  3556          1: (int){ 1 }
  3557        }
  3558      }
  3559      v2e: (_|_){
  3560        // [eval]
  3561        y: (_|_){
  3562          // [eval]
  3563          0: (_|_){
  3564            // [eval] nestedList.v2e.y.0: 4 errors in empty disjunction:
  3565            // nestedList.v2e.y.0: conflicting values int and [[2],1] (mismatched types int and list):
  3566            //     ./in.cue:443:11
  3567            //     ./in.cue:444:11
  3568            // nestedList.v2e.y.0.0: 2 errors in empty disjunction:
  3569            // nestedList.v2e.y.0.0: conflicting values int and [2] (mismatched types int and list):
  3570            //     ./in.cue:443:12
  3571            //     ./in.cue:444:11
  3572            // nestedList.v2e.y.0.0: incompatible list lengths (1 and 2)
  3573            0: (#list){
  3574              0: (int){ 2 }
  3575            }
  3576            1: (int){ 1 }
  3577          }
  3578          1: (int){ 1 }
  3579        }
  3580        x: (#list){
  3581          0: (int){ int }
  3582          1: (int){ 1 }
  3583        }
  3584      }
  3585      v1: (struct){
  3586        x: (#list){
  3587          0: (int){ int }
  3588          1: (int){ 1 }
  3589        }
  3590        y: (#list){
  3591          0: (#list){
  3592            0: (#list){
  3593              0: (int){ 2 }
  3594              1: (int){ 1 }
  3595            }
  3596            1: (int){ 1 }
  3597          }
  3598          1: (int){ 1 }
  3599        }
  3600      }
  3601      v2: (struct){
  3602        y: (#list){
  3603          0: (#list){
  3604            0: (#list){
  3605              0: (int){ 2 }
  3606              1: (int){ 1 }
  3607            }
  3608            1: (int){ 1 }
  3609          }
  3610          1: (int){ 1 }
  3611        }
  3612        x: (#list){
  3613          0: (int){ int }
  3614          1: (int){ 1 }
  3615        }
  3616      }
  3617    }
  3618    v3: (struct){
  3619      list: (struct){
  3620        head: (int){ int }
  3621        tail: (null){ null }
  3622      }
  3623      myList: (struct){
  3624        head: (int){ 2 }
  3625        tail: (struct){
  3626          head: (int){ 3 }
  3627          tail: (struct){
  3628            head: (int){ 4 }
  3629            tail: (null){ null }
  3630          }
  3631        }
  3632      }
  3633    }
  3634    v4: (struct){
  3635      list: (struct){
  3636        head: (int){ int }
  3637        tail: (int){ 1 }
  3638      }
  3639      myList: (struct){
  3640        head: (int){ 2 }
  3641        tail: (struct){
  3642          head: (int){ 3 }
  3643          tail: (int){ 1 }
  3644        }
  3645      }
  3646    }
  3647    v5: (struct){
  3648      list: (struct){
  3649        head: (int){ int }
  3650        tail: (struct){
  3651        }
  3652      }
  3653      myList: (struct){
  3654        head: (int){ 2 }
  3655        tail: (struct){ |((struct){
  3656            head: (int){ 3 }
  3657            tail: (struct){
  3658            }
  3659          }, (struct){
  3660            head: (int){ 3 }
  3661          }) }
  3662      }
  3663    }
  3664    z1: (_|_){
  3665      // [structural cycle]
  3666      y: (struct){
  3667        f: (struct){
  3668          h: (_){ _ }
  3669        }
  3670        g: (_){ _ }
  3671      }
  3672      x: (struct){
  3673        f: (_){ _ }
  3674        g: (_){ _ }
  3675      }
  3676      z: (_|_){
  3677        // [structural cycle]
  3678        f: (_|_){
  3679          // [structural cycle]
  3680          h: (_|_){
  3681            // [structural cycle] z1.z.f.h: structural cycle
  3682          }
  3683        }
  3684        g: (_|_){
  3685          // [structural cycle]
  3686          h: (_|_){
  3687            // [structural cycle] z1.z.g.h: structural cycle
  3688          }
  3689        }
  3690      }
  3691    }
  3692    crossRefNoCycle: (struct){
  3693      t1: (struct){
  3694        T: (struct){
  3695          x: (_){ _ }
  3696          y: (_){ _ }
  3697        }
  3698        C: (struct){
  3699          x: (struct){
  3700            x: (_){ _ }
  3701            y: (_){ _ }
  3702          }
  3703          y: (struct){
  3704            x: (_){ _ }
  3705            y: (_){ _ }
  3706          }
  3707        }
  3708      }
  3709      t2: (struct){
  3710        T: (struct){
  3711          x: (_){ _ }
  3712          y: (_){ _ }
  3713        }
  3714        C: (struct){
  3715          x: (struct){
  3716            x: (_){ _ }
  3717            y: (_){ _ }
  3718          }
  3719          y: (struct){
  3720            x: (_){ _ }
  3721            y: (_){ _ }
  3722          }
  3723        }
  3724      }
  3725      t3: (struct){
  3726        T: (struct){
  3727          x: (_){ _ }
  3728          y: (_){ _ }
  3729          z: (_){ _ }
  3730        }
  3731        C: (struct){
  3732          x: (struct){
  3733            x: (_){ _ }
  3734            y: (_){ _ }
  3735            z: (_){ _ }
  3736          }
  3737          y: (struct){
  3738            x: (_){ _ }
  3739            y: (_){ _ }
  3740            z: (_){ _ }
  3741          }
  3742          z: (struct){
  3743            x: (_){ _ }
  3744            y: (_){ _ }
  3745            z: (_){ _ }
  3746          }
  3747        }
  3748      }
  3749      t4: (struct){
  3750        T: (struct){
  3751          x: (_){ _ }
  3752          y: (_){ _ }
  3753          z: (_){ _ }
  3754        }
  3755        C: (struct){
  3756          x: (struct){
  3757            x: (struct){
  3758              x: (_){ _ }
  3759              y: (_){ _ }
  3760              z: (_){ _ }
  3761            }
  3762            y: (struct){
  3763              x: (_){ _ }
  3764              y: (_){ _ }
  3765              z: (_){ _ }
  3766            }
  3767            z: (struct){
  3768              x: (_){ _ }
  3769              y: (_){ _ }
  3770              z: (_){ _ }
  3771            }
  3772          }
  3773          y: (struct){
  3774            x: (struct){
  3775              x: (_){ _ }
  3776              y: (_){ _ }
  3777              z: (_){ _ }
  3778            }
  3779            y: (struct){
  3780              x: (_){ _ }
  3781              y: (_){ _ }
  3782              z: (_){ _ }
  3783            }
  3784            z: (struct){
  3785              x: (_){ _ }
  3786              y: (_){ _ }
  3787              z: (_){ _ }
  3788            }
  3789          }
  3790          z: (struct){
  3791            x: (struct){
  3792              x: (_){ _ }
  3793              y: (_){ _ }
  3794              z: (_){ _ }
  3795            }
  3796            y: (struct){
  3797              x: (_){ _ }
  3798              y: (_){ _ }
  3799              z: (_){ _ }
  3800            }
  3801            z: (struct){
  3802              x: (_){ _ }
  3803              y: (_){ _ }
  3804              z: (_){ _ }
  3805            }
  3806          }
  3807        }
  3808      }
  3809      t5: (struct){
  3810        T: (struct){
  3811          y: (_|_){
  3812            // [incomplete] crossRefNoCycle.t5.T.y: undefined field: x:
  3813            //     ./in.cue:556:8
  3814          }
  3815        }
  3816        C: (struct){
  3817          y: (struct){
  3818            y: (_|_){
  3819              // [incomplete] crossRefNoCycle.t5.C.y.y: undefined field: x:
  3820              //     ./in.cue:556:8
  3821            }
  3822          }
  3823          x: (struct){
  3824            y: (_|_){
  3825              // [incomplete] crossRefNoCycle.t5.C.x.y: undefined field: x:
  3826              //     ./in.cue:556:8
  3827            }
  3828          }
  3829        }
  3830      }
  3831    }
  3832    n1: (struct){
  3833      a: (struct){
  3834        b: (int){ int }
  3835      }
  3836    }
  3837    n2: (struct){
  3838      a: (struct){
  3839        b: (int){ int }
  3840        a: (struct){
  3841          b: (int){ int }
  3842        }
  3843      }
  3844    }
  3845    n3: (struct){
  3846      a: (struct){
  3847        b: (int){ int }
  3848      }
  3849    }
  3850    n4: (struct){
  3851      a: (struct){
  3852        b: (int){ int }
  3853      }
  3854      x: (struct){
  3855        a: (struct){
  3856          b: (int){ int }
  3857        }
  3858        y: (struct){
  3859          a: (struct){
  3860            b: (int){ int }
  3861          }
  3862          z: (int){ int }
  3863        }
  3864      }
  3865    }
  3866  }
  3867  -- out/compile --
  3868  --- edge.cue
  3869  {
  3870    resolveToAncestor: {
  3871      t1: {
  3872        X: {
  3873          a: 〈0;b〉.a
  3874          b: 〈1;X〉
  3875        }
  3876      }
  3877      t2: {
  3878        X: {
  3879          b: 〈1;X〉
  3880          a: 〈0;b〉.a
  3881        }
  3882      }
  3883    }
  3884  }
  3885  --- in.cue
  3886  {
  3887    a1: {
  3888      f: [
  3889        〈1;f〉,
  3890      ]
  3891    }
  3892    a2: {
  3893      f: 〈0;f〉
  3894    }
  3895    a3: {
  3896      f: {
  3897        g: 〈1;f〉
  3898      }
  3899    }
  3900    a4: {
  3901      a: [
  3902        (〈1;a〉|int),
  3903      ]
  3904    }
  3905    a5: {
  3906      a: {
  3907        b: (〈1;a〉|int)
  3908      }
  3909    }
  3910    a6: {
  3911      a: (〈0;a〉|int)
  3912    }
  3913    a7: {
  3914      a: 〈0;c〉.x
  3915      b: {
  3916        x: 〈1;c〉
  3917        y: "foo"
  3918      }
  3919      c: {
  3920        x: 〈1;b〉.y
  3921        y: 3
  3922      }
  3923    }
  3924    b1: {
  3925      b: (〈0;a〉 & [
  3926        1,
  3927      ])
  3928      a: [
  3929        (〈1;a〉|int),
  3930      ]
  3931    }
  3932    b2: {
  3933      a: [
  3934        (〈1;a〉|int),
  3935      ]
  3936      b: (〈0;a〉 & [
  3937        1,
  3938      ])
  3939    }
  3940    b3: {
  3941      x: {
  3942        a: [
  3943          (〈1;a〉|int),
  3944        ]
  3945      }
  3946      b: (〈0;x〉 & {
  3947        a: [
  3948          1,
  3949        ]
  3950      })
  3951    }
  3952    b4: {
  3953      b: (〈0;x〉.y & [
  3954        1,
  3955      ])
  3956      x: {
  3957        y: [
  3958          〈1;y〉,
  3959        ]
  3960      }
  3961    }
  3962    b4: {
  3963      cond1: {
  3964        b: (〈0;x〉.y & {
  3965          _z: false
  3966          [
  3967            1,
  3968          ]
  3969        })
  3970        x: {
  3971          y: {
  3972            _z: (*true|bool)
  3973            if 〈0;_z〉 {
  3974              [
  3975                〈3;y〉,
  3976              ]
  3977            }
  3978          }
  3979        }
  3980      }
  3981    }
  3982    b4: {
  3983      cond2: {
  3984        x: {
  3985          y: {
  3986            _z: (*true|bool)
  3987            if 〈0;_z〉 {
  3988              [
  3989                〈3;y〉,
  3990              ]
  3991            }
  3992          }
  3993        }
  3994        b: (〈0;x〉.y & {
  3995          _z: false
  3996          [
  3997            1,
  3998          ]
  3999        })
  4000      }
  4001    }
  4002    b5: {
  4003      b: (〈0;x〉.y & {
  4004        a: [
  4005          1,
  4006        ]
  4007      })
  4008      x: {
  4009        y: {
  4010          a: [
  4011            (〈1;a〉|int),
  4012          ]
  4013        }
  4014      }
  4015    }
  4016    b6: {
  4017      b: (〈0;x〉 & {
  4018        a: [
  4019          1,
  4020        ]
  4021      })
  4022      x: {
  4023        a: [
  4024          〈1;a〉,
  4025        ]
  4026      }
  4027    }
  4028    b7: {
  4029      b: (〈0;a〉 & [
  4030        [
  4031          1,
  4032        ],
  4033      ])
  4034      a: [
  4035        〈1;a〉,
  4036      ]
  4037    }
  4038    b8: {
  4039      x: 〈0;a〉
  4040      a: {
  4041        f: 〈1;b〉
  4042      }
  4043      b: (〈0;a〉|string)
  4044    }
  4045    b9: {
  4046      #a: (string|〈0;#b〉|〈0;#ref〉)
  4047      #b: {
  4048        c: [
  4049          〈2;#a〉,
  4050          〈2;#a〉,
  4051          〈2;#a〉,
  4052        ]
  4053      }
  4054      #ref: {
  4055        ref: string
  4056      }
  4057      x: (〈0;#b〉|〈0;#ref〉)
  4058    }
  4059    b10: {
  4060      a: close({
  4061        b: (string|〈1;a〉|〈1;c〉)
  4062      })
  4063      c: close({
  4064        d: (string|〈1;a〉)
  4065      })
  4066      d: {
  4067        d: {
  4068          b: string
  4069        }
  4070      }
  4071    }
  4072    b11: {
  4073      #list: {
  4074        tail: (〈1;#list〉|*null)
  4075        if (〈0;tail〉 != null) {}
  4076      }
  4077    }
  4078    b12: {
  4079      #list: {
  4080        value: int
  4081        tail: (〈1;#list〉|*null)
  4082        if (〈0;tail〉 != null) {
  4083          sum: (〈1;value〉 + 〈1;tail〉.sum)
  4084        }
  4085        if (〈0;tail〉 == null) {
  4086          sum: 〈1;value〉
  4087        }
  4088      }
  4089      list1: 〈0;#list〉
  4090      list1: {
  4091        value: 1
  4092        tail: {
  4093          value: 2
  4094          tail: {
  4095            value: 3
  4096            tail: {
  4097              value: 4
  4098            }
  4099          }
  4100        }
  4101      }
  4102    }
  4103    b12b: {
  4104      #list: {
  4105        tail: 〈1;#list〉
  4106        if (〈0;tail〉 != null) {
  4107          sum: 〈1;tail〉.sum
  4108        }
  4109      }
  4110      list1: 〈0;#list〉
  4111      list1: {
  4112        tail: {
  4113          tail: {}
  4114        }
  4115      }
  4116    }
  4117    b13: {
  4118      root: {
  4119        a: [
  4120          for _, x in 〈2;root〉 {
  4121            〈1;x〉
  4122          },
  4123        ]
  4124      }
  4125    }
  4126    b14: {
  4127      root: {
  4128        a: [
  4129          ...int,
  4130        ]
  4131        for _, x in 〈0;a〉 {
  4132          "\(〈1;x〉)": {}
  4133        }
  4134        b: [
  4135          for _, x in 〈2;root〉 {
  4136            〈1;x〉
  4137          },
  4138        ]
  4139      }
  4140    }
  4141    b15: {
  4142      root: {
  4143        a: {
  4144          for _, x in 〈2;root〉 {
  4145            〈1;x〉
  4146          }
  4147        }
  4148      }
  4149    }
  4150    p1: {
  4151      #T: {
  4152        a: {
  4153          [string]: {
  4154            link: 〈3;#T〉
  4155          }
  4156        }
  4157      }
  4158      a: (〈0;#T〉 & {
  4159        a: {
  4160          one: {
  4161            link: {
  4162              a: {
  4163                two: {}
  4164              }
  4165            }
  4166          }
  4167        }
  4168      })
  4169    }
  4170    p2: {
  4171      #T: {
  4172        a: {
  4173          [string]: {
  4174            link: 〈3;#T〉
  4175          }
  4176        }
  4177        a: {
  4178          b: {}
  4179        }
  4180      }
  4181      a: (〈0;#T〉 & {
  4182        a: {
  4183          one: {
  4184            link: {
  4185              a: {
  4186                two: {}
  4187              }
  4188            }
  4189          }
  4190        }
  4191      })
  4192    }
  4193    p3: {
  4194      #S: {
  4195        #T: {
  4196          a: {
  4197            [string]: {
  4198              link: 〈3;#T〉
  4199            }
  4200          }
  4201        }
  4202      }
  4203      #U: {
  4204        〈1;#S〉
  4205        #T: {
  4206          a: {
  4207            b: {}
  4208          }
  4209        }
  4210      }
  4211      a: (〈0;#U〉.#T & {
  4212        a: {
  4213          one: {
  4214            link: {
  4215              a: {
  4216                two: {}
  4217              }
  4218            }
  4219          }
  4220        }
  4221      })
  4222    }
  4223    p4: {
  4224      #T: {
  4225        a: [
  4226          ...{
  4227            link: 〈3;#T〉
  4228          },
  4229        ]
  4230      }
  4231      a: (〈0;#T〉 & {
  4232        a: [
  4233          {
  4234            link: {
  4235              a: [
  4236                {},
  4237              ]
  4238            }
  4239          },
  4240        ]
  4241      })
  4242    }
  4243    p5: {
  4244      #T: {
  4245        a: [
  4246          ...{
  4247            link: 〈3;#T〉
  4248          },
  4249        ]
  4250        a: [
  4251          {},
  4252        ]
  4253      }
  4254      a: (〈0;#T〉 & {
  4255        a: [
  4256          {
  4257            link: {
  4258              a: [
  4259                {},
  4260              ]
  4261            }
  4262          },
  4263        ]
  4264      })
  4265    }
  4266    p6: {
  4267      #S: {
  4268        #T: {
  4269          a: [
  4270            ...{
  4271              link: 〈3;#T〉
  4272            },
  4273          ]
  4274        }
  4275      }
  4276      #U: {
  4277        〈1;#S〉
  4278        #T: {
  4279          a: [
  4280            {},
  4281          ]
  4282        }
  4283      }
  4284      a: (〈0;#U〉.#T & {
  4285        a: [
  4286          {
  4287            link: {
  4288              a: [
  4289                {},
  4290              ]
  4291            }
  4292          },
  4293        ]
  4294      })
  4295    }
  4296    c1: {
  4297      a: {
  4298        b: {}
  4299        c: (〈1;a〉 & 〈0;b〉)
  4300      }
  4301    }
  4302    d1: {
  4303      a: {
  4304        b: {
  4305          c: {
  4306            d: {
  4307              h: int
  4308              t: 〈4;r〉
  4309            }
  4310          }
  4311        }
  4312      }
  4313      r: 〈0;a〉.b
  4314      x: 〈0;a〉.b.c
  4315    }
  4316    d2: {
  4317      x: 〈0;a〉.b.c
  4318      r: 〈0;a〉.b
  4319      a: {
  4320        b: {
  4321          c: {
  4322            d: {
  4323              h: int
  4324              t: 〈4;r〉
  4325            }
  4326          }
  4327        }
  4328      }
  4329    }
  4330    d3: {
  4331      config: {
  4332        a: {
  4333          b: {
  4334            c: 〈2;indirect〉
  4335          }
  4336        }
  4337        indirect: [
  4338          〈1;a〉.b,
  4339          null,
  4340        ][〈0;i〉]
  4341        i: (int|*1)
  4342      }
  4343      x: (〈0;config〉 & {
  4344        i: 0
  4345      })
  4346    }
  4347    shortPathFail: _
  4348    shortPathFail: {
  4349      doubleRef: {
  4350        a: 〈0;#List〉
  4351        #List: {
  4352          Next: (〈1;#List〉|*null)
  4353        }
  4354      }
  4355    }
  4356    shortPathFail: {
  4357      elipsis: {
  4358        t1: {
  4359          #Foo: {
  4360            ref: (null|〈1;#Foo〉)
  4361          }
  4362          #Foo: {
  4363            ...
  4364          }
  4365        }
  4366        t2: {
  4367          Foo: {
  4368            ref: 〈1;Foo〉
  4369          }
  4370          Foo: {
  4371            ...
  4372          }
  4373        }
  4374      }
  4375    }
  4376    patternFail: {
  4377      issue2374: {
  4378        [string]: {
  4379          b: 〈1;(〈0;-〉)〉
  4380        }
  4381        a: {
  4382          r: 0
  4383        }
  4384      }
  4385    }
  4386    shortPathFail: {
  4387      comprehension: {
  4388        #list: {
  4389          tail: (〈1;#list〉|*null)
  4390          if (〈0;tail〉 != null) {}
  4391        }
  4392      }
  4393    }
  4394    withLetFail: {
  4395      schema: {
  4396        next: 〈1;let _schema_1#1〉
  4397      }
  4398      let _schema_1#1 = 〈0;schema〉
  4399    }
  4400    fieldsSumInfinite: {
  4401      issue3310: {
  4402        cheeseburger: 3.00
  4403        fries: 2.00
  4404        sprite: 1.00
  4405        total: 〈import;list〉.Sum([
  4406          for _, v in 〈2;issue3310〉 {
  4407            〈1;v〉
  4408          },
  4409        ])
  4410      }
  4411    }
  4412    listOptOK: {
  4413      list: {
  4414        head: int
  4415        tail?: 〈1;list〉
  4416      }
  4417      a: (〈0;list〉 & {
  4418        head: 3
  4419        tail: {
  4420          head: 2
  4421        }
  4422      })
  4423    }
  4424    issue2545: {
  4425      #A: {
  4426        B?: 〈1;#B〉
  4427      }
  4428      #B: {
  4429        A: 〈1;#A〉
  4430      }
  4431    }
  4432    e1: {
  4433      a: 〈0;a〉
  4434      a: {
  4435        c: 〈1;a〉
  4436      }
  4437      b: {
  4438        c: 〈1;b〉
  4439      }
  4440      b: 〈0;b〉
  4441    }
  4442    e2: {
  4443      a: {
  4444        〈1;a〉
  4445      }
  4446      a: {
  4447        c: 〈1;a〉
  4448      }
  4449      b: {
  4450        c: 〈1;b〉
  4451      }
  4452      b: {
  4453        〈1;b〉
  4454      }
  4455    }
  4456    e3: {
  4457      a: [
  4458        〈1;a〉,
  4459      ]
  4460      a: {
  4461        c: 〈1;a〉
  4462      }
  4463      b: [
  4464        〈1;b〉,
  4465      ]
  4466      b: {
  4467        c: 〈1;b〉
  4468      }
  4469    }
  4470    e4: {
  4471      a: [
  4472        (〈1;a〉|{}),
  4473      ]
  4474      a: [
  4475        [
  4476          {
  4477            c: 1
  4478          },
  4479        ],
  4480      ]
  4481      b: [
  4482        [
  4483          {
  4484            c: 1
  4485          },
  4486        ],
  4487      ]
  4488      b: [
  4489        (〈1;b〉|{}),
  4490      ]
  4491    }
  4492    e5: {
  4493      a: {
  4494        c: (〈1;a〉|int)
  4495      }
  4496      a: (〈0;a〉|int)
  4497      b: (〈0;b〉|int)
  4498      b: {
  4499        c: (〈1;b〉|int)
  4500      }
  4501    }
  4502    nestedList: {
  4503      v1e: {
  4504        x: [
  4505          (〈1;x〉|int),
  4506          1,
  4507        ]
  4508        y: (〈0;x〉 & [
  4509          [
  4510            [
  4511              2,
  4512            ],
  4513            1,
  4514          ],
  4515          1,
  4516        ])
  4517      }
  4518      v2e: {
  4519        y: (〈0;x〉 & [
  4520          [
  4521            [
  4522              2,
  4523            ],
  4524            1,
  4525          ],
  4526          1,
  4527        ])
  4528        x: [
  4529          (〈1;x〉|int),
  4530          1,
  4531        ]
  4532      }
  4533      v1: {
  4534        x: [
  4535          (〈1;x〉|int),
  4536          1,
  4537        ]
  4538        y: (〈0;x〉 & [
  4539          [
  4540            [
  4541              2,
  4542              1,
  4543            ],
  4544            1,
  4545          ],
  4546          1,
  4547        ])
  4548      }
  4549      v2: {
  4550        y: (〈0;x〉 & [
  4551          [
  4552            [
  4553              2,
  4554              1,
  4555            ],
  4556            1,
  4557          ],
  4558          1,
  4559        ])
  4560        x: [
  4561          (〈1;x〉|int),
  4562          1,
  4563        ]
  4564      }
  4565    }
  4566    v3: {
  4567      list: {
  4568        head: int
  4569        tail: (〈1;list〉|null)
  4570      }
  4571      myList: 〈0;list〉
  4572      myList: {
  4573        head: 2
  4574        tail: {
  4575          head: 3
  4576          tail: {
  4577            head: 4
  4578          }
  4579        }
  4580      }
  4581    }
  4582    v4: {
  4583      list: {
  4584        head: int
  4585        tail: (〈1;list〉|1)
  4586      }
  4587      myList: 〈0;list〉
  4588      myList: {
  4589        head: 2
  4590        tail: {
  4591          head: 3
  4592        }
  4593      }
  4594    }
  4595    v5: {
  4596      list: {
  4597        head: int
  4598        tail: (〈1;list〉|{})
  4599      }
  4600      myList: 〈0;list〉
  4601      myList: {
  4602        head: 2
  4603        tail: {
  4604          head: 3
  4605        }
  4606      }
  4607    }
  4608    z1: {
  4609      y: {
  4610        f: {
  4611          h: 〈1;g〉
  4612        }
  4613        g: _
  4614      }
  4615      x: {
  4616        f: _
  4617        g: 〈0;f〉
  4618      }
  4619      z: (〈0;x〉 & 〈0;y〉)
  4620    }
  4621    crossRefNoCycle: {
  4622      t1: {
  4623        T: {
  4624          x: _
  4625          y: 〈0;x〉
  4626        }
  4627        C: ({
  4628          x: 〈1;T〉
  4629        } & 〈0;T〉)
  4630      }
  4631    }
  4632    crossRefNoCycle: {
  4633      t2: {
  4634        T: {
  4635          x: _
  4636          y: 〈0;x〉
  4637        }
  4638        C: (〈0;T〉 & {
  4639          x: 〈1;T〉
  4640        })
  4641      }
  4642    }
  4643    crossRefNoCycle: {
  4644      t3: {
  4645        T: {
  4646          x: _
  4647          y: 〈0;x〉
  4648          z: 〈0;y〉
  4649        }
  4650        C: (〈0;T〉 & {
  4651          x: 〈1;T〉
  4652        })
  4653      }
  4654    }
  4655    crossRefNoCycle: {
  4656      t4: {
  4657        T: {
  4658          x: _
  4659          y: 〈0;x〉
  4660          z: 〈0;y〉
  4661        }
  4662        C: (〈0;T〉 & {
  4663          x: (〈1;T〉 & {
  4664            x: 〈2;T〉
  4665          })
  4666        })
  4667      }
  4668    }
  4669    crossRefNoCycle: {
  4670      t5: {
  4671        T: {
  4672          y: 〈1〉.x
  4673        }
  4674        C: (〈0;T〉 & {
  4675          x: 〈1;T〉
  4676        })
  4677      }
  4678    }
  4679    n1: {
  4680      a: {
  4681        b: int
  4682      }
  4683    }
  4684    n2: (〈0;n1〉 & {
  4685      a: 〈1;n1〉
  4686    })
  4687    n3: (〈0;n1〉 & {
  4688      〈1;n1〉
  4689    })
  4690    n4: (〈0;n1〉 & {
  4691      x: (〈1;n1〉 & {
  4692        y: (〈2;n1〉 & {
  4693          z: int
  4694        })
  4695      })
  4696    })
  4697  }