cuelang.org/go@v0.13.0/cue/testdata/fulleval/018_recursive_evaluation_within_list.txtar (about)

     1  #name: recursive evaluation within list
     2  #evalFull
     3  -- in.cue --
     4  l: [a]
     5  a: b & {c: "t"}
     6  b: {
     7  	d: c
     8  	c: string
     9  }
    10  l1: [a1]
    11  a1: b1 & {c: "t"}
    12  b1: {
    13  	d: "s" + c
    14  	c: string
    15  }
    16  -- out/def --
    17  l: [a]
    18  a: b & {
    19  	c: "t"
    20  }
    21  b: {
    22  	c: string
    23  	d: c
    24  }
    25  l1: [a1]
    26  a1: b1 & {
    27  	c: "t"
    28  }
    29  b1: {
    30  	c: string
    31  	d: "s" + c
    32  }
    33  -- out/legacy-debug --
    34  <0>{l: [<1>{c: "t", d: "t"}], a: <2>{c: "t", d: "t"}, b: <3>{c: string, d: string}, l1: [<4>{c: "t", d: "st"}], a1: <5>{c: "t", d: "st"}, b1: <6>{c: string, d: ("s" + <7>.c)}}
    35  -- out/compile --
    36  --- in.cue
    37  {
    38    l: [
    39      〈1;a〉,
    40    ]
    41    a: (〈0;b〉 & {
    42      c: "t"
    43    })
    44    b: {
    45      d: 〈0;c〉
    46      c: string
    47    }
    48    l1: [
    49      〈1;a1〉,
    50    ]
    51    a1: (〈0;b1〉 & {
    52      c: "t"
    53    })
    54    b1: {
    55      d: ("s" + 〈0;c〉)
    56      c: string
    57    }
    58  }
    59  -- out/eval/stats --
    60  Leaks:  0
    61  Freed:  21
    62  Reused: 14
    63  Allocs: 7
    64  Retain: 14
    65  
    66  Unifications: 21
    67  Conjuncts:    40
    68  Disjuncts:    31
    69  -- out/evalalpha --
    70  (struct){
    71    l: (#list){
    72      0: ~(a)
    73    }
    74    a: (struct){
    75      c: (string){ "t" }
    76      d: (string){ "t" }
    77    }
    78    b: (struct){
    79      d: (string){ string }
    80      c: (string){ string }
    81    }
    82    l1: (#list){
    83      0: ~(a1)
    84    }
    85    a1: (struct){
    86      c: (string){ "t" }
    87      d: (string){ "st" }
    88    }
    89    b1: (struct){
    90      d: (_|_){
    91        // [incomplete] b1.d: non-concrete value string in operand to +:
    92        //     ./in.cue:10:5
    93        //     ./in.cue:11:5
    94      }
    95      c: (string){ string }
    96    }
    97  }
    98  -- diff/-out/evalalpha<==>+out/eval --
    99  diff old new
   100  --- old
   101  +++ new
   102  @@ -1,13 +1,10 @@
   103   (struct){
   104     l: (#list){
   105  -    0: (struct){
   106  -      d: (string){ "t" }
   107  -      c: (string){ "t" }
   108  -    }
   109  +    0: ~(a)
   110     }
   111     a: (struct){
   112  +    c: (string){ "t" }
   113       d: (string){ "t" }
   114  -    c: (string){ "t" }
   115     }
   116     b: (struct){
   117       d: (string){ string }
   118  @@ -14,14 +11,11 @@
   119       c: (string){ string }
   120     }
   121     l1: (#list){
   122  -    0: (struct){
   123  -      d: (string){ "st" }
   124  -      c: (string){ "t" }
   125  -    }
   126  +    0: ~(a1)
   127     }
   128     a1: (struct){
   129  +    c: (string){ "t" }
   130       d: (string){ "st" }
   131  -    c: (string){ "t" }
   132     }
   133     b1: (struct){
   134       d: (_|_){
   135  -- diff/todo/p3 --
   136  Reordering
   137  -- out/eval --
   138  (struct){
   139    l: (#list){
   140      0: (struct){
   141        d: (string){ "t" }
   142        c: (string){ "t" }
   143      }
   144    }
   145    a: (struct){
   146      d: (string){ "t" }
   147      c: (string){ "t" }
   148    }
   149    b: (struct){
   150      d: (string){ string }
   151      c: (string){ string }
   152    }
   153    l1: (#list){
   154      0: (struct){
   155        d: (string){ "st" }
   156        c: (string){ "t" }
   157      }
   158    }
   159    a1: (struct){
   160      d: (string){ "st" }
   161      c: (string){ "t" }
   162    }
   163    b1: (struct){
   164      d: (_|_){
   165        // [incomplete] b1.d: non-concrete value string in operand to +:
   166        //     ./in.cue:10:5
   167        //     ./in.cue:11:5
   168      }
   169      c: (string){ string }
   170    }
   171  }