cuelang.org/go@v0.10.1/cue/testdata/benchmarks/dedupelem.txtar (about)

     1  -- stats.txt --
     2  Leaks:  0
     3  Freed:  16
     4  Reused: 10
     5  Allocs: 6
     6  Retain: 0
     7  
     8  Unifications: 10
     9  Conjuncts:    94
    10  Disjuncts:    16
    11  
    12  -- in.cue --
    13  package lpcorpus
    14  
    15  #Value: {type: "int"} | {type: "float"} | {type: "string"}
    16  
    17  foo: [{type: "float"}] & [...#Value]
    18  foo: [{type: "float"}] & [...#Value]
    19  foo: [{type: "float"}] & [...#Value]
    20  foo: [{type: "float"}] & [...#Value]
    21  foo: [{type: "float"}] & [...#Value]
    22  foo: [{type: "string"}] & [...#Value]
    23  foo: [{type: "string"}] & [...#Value]
    24  foo: [{type: "string"}] & [...#Value]
    25  foo: [{type: "float"}] & [...#Value]
    26  foo: [{type: "float"}] & [...#Value]
    27  -- out/eval/stats --
    28  Leaks:  0
    29  Freed:  16
    30  Reused: 10
    31  Allocs: 6
    32  Retain: 0
    33  
    34  Unifications: 10
    35  Conjuncts:    94
    36  Disjuncts:    16
    37  -- out/evalalpha --
    38  Errors:
    39  foo.0.type: conflicting values "string" and "float":
    40      ./in.cue:5:14
    41      ./in.cue:10:14
    42  
    43  Result:
    44  (_|_){
    45    // [eval]
    46    #Value: (#struct){ |((#struct){
    47        type: (string){ "int" }
    48      }, (#struct){
    49        type: (string){ "float" }
    50      }, (#struct){
    51        type: (string){ "string" }
    52      }) }
    53    foo: (_|_){
    54      // [eval]
    55      0: (_|_){
    56        // [eval] foo.0.type: conflicting values "string" and "float":
    57        //     ./in.cue:5:14
    58        //     ./in.cue:10:14
    59        type: (_|_){
    60          // [eval] foo.0.type: conflicting values "string" and "float":
    61          //     ./in.cue:5:14
    62          //     ./in.cue:10:14
    63        }
    64      }
    65    }
    66  }
    67  -- diff/-out/evalalpha<==>+out/eval --
    68  diff old new
    69  --- old
    70  +++ new
    71  @@ -1,10 +1,4 @@
    72   Errors:
    73  -foo.0: 2 errors in empty disjunction:
    74  -foo.0.type: conflicting values "int" and "float":
    75  -    ./in.cue:3:16
    76  -    ./in.cue:5:14
    77  -    ./in.cue:5:27
    78  -    ./in.cue:5:30
    79   foo.0.type: conflicting values "string" and "float":
    80       ./in.cue:5:14
    81       ./in.cue:10:14
    82  @@ -22,13 +16,7 @@
    83     foo: (_|_){
    84       // [eval]
    85       0: (_|_){
    86  -      // [eval] foo.0: 2 errors in empty disjunction:
    87  -      // foo.0.type: conflicting values "int" and "float":
    88  -      //     ./in.cue:3:16
    89  -      //     ./in.cue:5:14
    90  -      //     ./in.cue:5:27
    91  -      //     ./in.cue:5:30
    92  -      // foo.0.type: conflicting values "string" and "float":
    93  +      // [eval] foo.0.type: conflicting values "string" and "float":
    94         //     ./in.cue:5:14
    95         //     ./in.cue:10:14
    96         type: (_|_){
    97  -- diff/explanation --
    98  Improved and simplified error message which can be detected before disjunction.
    99  -- out/eval --
   100  Errors:
   101  foo.0: 2 errors in empty disjunction:
   102  foo.0.type: conflicting values "int" and "float":
   103      ./in.cue:3:16
   104      ./in.cue:5:14
   105      ./in.cue:5:27
   106      ./in.cue:5:30
   107  foo.0.type: conflicting values "string" and "float":
   108      ./in.cue:5:14
   109      ./in.cue:10:14
   110  
   111  Result:
   112  (_|_){
   113    // [eval]
   114    #Value: (#struct){ |((#struct){
   115        type: (string){ "int" }
   116      }, (#struct){
   117        type: (string){ "float" }
   118      }, (#struct){
   119        type: (string){ "string" }
   120      }) }
   121    foo: (_|_){
   122      // [eval]
   123      0: (_|_){
   124        // [eval] foo.0: 2 errors in empty disjunction:
   125        // foo.0.type: conflicting values "int" and "float":
   126        //     ./in.cue:3:16
   127        //     ./in.cue:5:14
   128        //     ./in.cue:5:27
   129        //     ./in.cue:5:30
   130        // foo.0.type: conflicting values "string" and "float":
   131        //     ./in.cue:5:14
   132        //     ./in.cue:10:14
   133        type: (_|_){
   134          // [eval] foo.0.type: conflicting values "string" and "float":
   135          //     ./in.cue:5:14
   136          //     ./in.cue:10:14
   137        }
   138      }
   139    }
   140  }
   141  -- out/compile --
   142  --- in.cue
   143  {
   144    #Value: ({
   145      type: "int"
   146    }|{
   147      type: "float"
   148    }|{
   149      type: "string"
   150    })
   151    foo: ([
   152      {
   153        type: "float"
   154      },
   155    ] & [
   156      ...〈1;#Value〉,
   157    ])
   158    foo: ([
   159      {
   160        type: "float"
   161      },
   162    ] & [
   163      ...〈1;#Value〉,
   164    ])
   165    foo: ([
   166      {
   167        type: "float"
   168      },
   169    ] & [
   170      ...〈1;#Value〉,
   171    ])
   172    foo: ([
   173      {
   174        type: "float"
   175      },
   176    ] & [
   177      ...〈1;#Value〉,
   178    ])
   179    foo: ([
   180      {
   181        type: "float"
   182      },
   183    ] & [
   184      ...〈1;#Value〉,
   185    ])
   186    foo: ([
   187      {
   188        type: "string"
   189      },
   190    ] & [
   191      ...〈1;#Value〉,
   192    ])
   193    foo: ([
   194      {
   195        type: "string"
   196      },
   197    ] & [
   198      ...〈1;#Value〉,
   199    ])
   200    foo: ([
   201      {
   202        type: "string"
   203      },
   204    ] & [
   205      ...〈1;#Value〉,
   206    ])
   207    foo: ([
   208      {
   209        type: "float"
   210      },
   211    ] & [
   212      ...〈1;#Value〉,
   213    ])
   214    foo: ([
   215      {
   216        type: "float"
   217      },
   218    ] & [
   219      ...〈1;#Value〉,
   220    ])
   221  }