cuelang.org/go@v0.13.0/cue/testdata/export/030.txtar (about)

     1  raw: true
     2  eval: true
     3  -- in.cue --
     4  {
     5  	#Foo: {
     6  		sgl:  #Bar
     7  		ref:  null | #Foo
     8  		ext:  #Bar | null
     9  		ref:  null | #Foo
    10  		ref2: null | #Foo.sgl
    11  		...
    12  	}
    13  	#Foo: {
    14  		"#Foo": 2
    15  		...
    16  	}
    17  	#Bar: string
    18  }
    19  -- out/def --
    20  #Foo: {
    21  	"#Foo": 2
    22  	sgl:    #Bar
    23  	ref:    (null | #Foo) & (null | #Foo)
    24  	ext:    #Bar | null
    25  	ref2:   null | #Foo.sgl
    26  	...
    27  }
    28  #Bar: string
    29  -- out/export --
    30  
    31  -- out/yaml --
    32  {}
    33  -- out/json --
    34  {}
    35  -- out/compile --
    36  --- in.cue
    37  {
    38    {
    39      #Foo: {
    40        sgl: 〈1;#Bar〉
    41        ref: (null|〈1;#Foo〉)
    42        ext: (〈1;#Bar〉|null)
    43        ref: (null|〈1;#Foo〉)
    44        ref2: (null|〈1;#Foo〉.sgl)
    45        ...
    46      }
    47      #Foo: {
    48        "#Foo": 2
    49        ...
    50      }
    51      #Bar: string
    52    }
    53  }
    54  -- out/evalalpha/stats --
    55  Leaks:  23
    56  Freed:  0
    57  Reused: 0
    58  Allocs: 23
    59  Retain: 0
    60  
    61  Unifications: 8
    62  Conjuncts:    25
    63  Disjuncts:    10
    64  
    65  CloseIDElems: 0
    66  NumCloseIDs: 4
    67  -- diff/-out/evalalpha/stats<==>+out/eval/stats --
    68  diff old new
    69  --- old
    70  +++ new
    71  @@ -1,9 +1,12 @@
    72  -Leaks:  0
    73  -Freed:  70
    74  -Reused: 59
    75  -Allocs: 11
    76  -Retain: 1
    77  -
    78  -Unifications: 28
    79  -Conjuncts:    131
    80  -Disjuncts:    71
    81  +Leaks:  23
    82  +Freed:  0
    83  +Reused: 0
    84  +Allocs: 23
    85  +Retain: 0
    86  +
    87  +Unifications: 8
    88  +Conjuncts:    25
    89  +Disjuncts:    10
    90  +
    91  +CloseIDElems: 0
    92  +NumCloseIDs: 4
    93  -- out/eval/stats --
    94  Leaks:  0
    95  Freed:  70
    96  Reused: 59
    97  Allocs: 11
    98  Retain: 1
    99  
   100  Unifications: 28
   101  Conjuncts:    131
   102  Disjuncts:    71
   103  -- out/evalalpha --
   104  (struct){
   105    #Foo: (#struct){
   106      sgl: (string){ string }
   107      ref: (null){ null }
   108      ext: ((null|string)){ |((string){ string }, (null){ null }) }
   109      ref2: ((null|string)){ |((null){ null }, (string){ string }) }
   110      "#Foo": (int){ 2 }
   111    }
   112    #Bar: (string){ string }
   113  }
   114  -- diff/-out/evalalpha<==>+out/eval --
   115  diff old new
   116  --- old
   117  +++ new
   118  @@ -1,13 +1,7 @@
   119   (struct){
   120     #Foo: (#struct){
   121       sgl: (string){ string }
   122  -    ref: ((null|struct)){ |((null){ null }, (#struct){
   123  -        sgl: (string){ string }
   124  -        ref: (null){ null }
   125  -        ext: ((null|string)){ |((string){ string }, (null){ null }) }
   126  -        ref2: ((null|string)){ |((null){ null }, (string){ string }) }
   127  -        "#Foo": (int){ 2 }
   128  -      }) }
   129  +    ref: (null){ null }
   130       ext: ((null|string)){ |((string){ string }, (null){ null }) }
   131       ref2: ((null|string)){ |((null){ null }, (string){ string }) }
   132       "#Foo": (int){ 2 }
   133  -- diff/todo/p2 --
   134  Structural cycle eliminated too soon?
   135  -- out/eval --
   136  (struct){
   137    #Foo: (#struct){
   138      sgl: (string){ string }
   139      ref: ((null|struct)){ |((null){ null }, (#struct){
   140          sgl: (string){ string }
   141          ref: (null){ null }
   142          ext: ((null|string)){ |((string){ string }, (null){ null }) }
   143          ref2: ((null|string)){ |((null){ null }, (string){ string }) }
   144          "#Foo": (int){ 2 }
   145        }) }
   146      ext: ((null|string)){ |((string){ string }, (null){ null }) }
   147      ref2: ((null|string)){ |((null){ null }, (string){ string }) }
   148      "#Foo": (int){ 2 }
   149    }
   150    #Bar: (string){ string }
   151  }