cuelang.org/go@v0.13.0/cue/testdata/benchmarks/issue3517.txtar (about)

     1  -- main.cue --
     2  package p
     3  
     4  #TimeSpan: {
     5  	start:    float
     6  	duration: float
     7  	end:      float
     8  
     9  	start:    end - duration
    10  	duration: end - start
    11  	end:      start + duration
    12  
    13  	start: <=end
    14  }
    15  
    16  #Task: {
    17  	action:   string
    18  	timeSpan: #TimeSpan
    19  }
    20  
    21  #TaskSet: {
    22  	action: string
    23  	#tasks: [string]: #Task
    24  	tasks: [for _, v in #tasks {v}]
    25  	tasks: [...#Task]
    26  	timeSpan?: #TimeSpan
    27  }
    28  
    29  #T1: #Task & {
    30  	action: "Task 1"
    31  	timeSpan: #TimeSpan & {
    32  		duration: 4.2
    33  	}
    34  }
    35  
    36  #T2: #Task & {
    37  	action: "Task 2"
    38  	timeSpan: #TimeSpan & {
    39  		duration: 120.0
    40  	}
    41  }
    42  
    43  ts: #TaskSet
    44  ts: this={
    45  	action: "Task 1 and Task 2"
    46  	#tasks: {
    47  		t1: #T1 & {
    48  			timeSpan: end: this.#tasks.t2.timeSpan.start
    49  		}
    50  		t2: #T2 & {
    51  			timeSpan: end: 119 // this.timeSpan.end
    52  		}
    53  	}
    54  	timeSpan: start: this.#tasks.t1.timeSpan.start
    55  }
    56  -- out/evalalpha/stats --
    57  Leaks:  49
    58  Freed:  0
    59  Reused: 0
    60  Allocs: 49
    61  Retain: 0
    62  
    63  Unifications: 49
    64  Conjuncts:    123
    65  Disjuncts:    0
    66  
    67  CloseIDElems: 32
    68  NumCloseIDs: 13
    69  -- diff/-out/evalalpha/stats<==>+out/eval/stats --
    70  diff old new
    71  --- old
    72  +++ new
    73  @@ -1,9 +1,12 @@
    74  -Leaks:  2
    75  -Freed:  49
    76  -Reused: 39
    77  -Allocs: 12
    78  -Retain: 608
    79  -
    80  -Unifications: 51
    81  -Conjuncts:    801
    82  -Disjuncts:    73
    83  +Leaks:  49
    84  +Freed:  0
    85  +Reused: 0
    86  +Allocs: 49
    87  +Retain: 0
    88  +
    89  +Unifications: 49
    90  +Conjuncts:    123
    91  +Disjuncts:    0
    92  +
    93  +CloseIDElems: 32
    94  +NumCloseIDs: 13
    95  -- out/eval/stats --
    96  Leaks:  2
    97  Freed:  49
    98  Reused: 39
    99  Allocs: 12
   100  Retain: 608
   101  
   102  Unifications: 51
   103  Conjuncts:    801
   104  Disjuncts:    73
   105  -- out/evalalpha --
   106  Errors:
   107  ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   108      ./main.cue:6:12
   109      ./main.cue:50:19
   110  
   111  Result:
   112  (_|_){
   113    // [eval]
   114    #TimeSpan: (#struct){
   115      start: (_|_){
   116        // [incomplete] #TimeSpan.start: non-concrete value end for bound <=:
   117        //     ./main.cue:12:11
   118        // #TimeSpan.start: non-concrete value float in operand to -:
   119        //     ./main.cue:8:12
   120        //     ./main.cue:6:12
   121        //     ./main.cue:10:12
   122        // #TimeSpan.duration: non-concrete value float in operand to -:
   123        //     ./main.cue:9:12
   124        //     ./main.cue:6:12
   125        //     ./main.cue:10:12
   126      }
   127      duration: (_|_){
   128        // [incomplete] #TimeSpan.start: non-concrete value end for bound <=:
   129        //     ./main.cue:12:11
   130        // #TimeSpan.duration: non-concrete value float in operand to -:
   131        //     ./main.cue:9:12
   132        //     ./main.cue:6:12
   133        //     ./main.cue:10:12
   134      }
   135      end: (_|_){
   136        // [incomplete] #TimeSpan.start: non-concrete value end for bound <=:
   137        //     ./main.cue:12:11
   138        // #TimeSpan.duration: non-concrete value float in operand to -:
   139        //     ./main.cue:9:12
   140        //     ./main.cue:6:12
   141        //     ./main.cue:10:12
   142      }
   143    }
   144    #Task: (#struct){
   145      action: (string){ string }
   146      timeSpan: ~(#TimeSpan)
   147    }
   148    #TaskSet: (#struct){
   149      action: (string){ string }
   150      #tasks: (#struct){
   151      }
   152      tasks: (#list){
   153      }
   154      timeSpan?: ~(#TimeSpan)
   155    }
   156    #T1: (#struct){
   157      action: (string){ "Task 1" }
   158      timeSpan: (#struct){
   159        duration: (_|_){
   160          // [incomplete] #T1.timeSpan.start: non-concrete value end for bound <=:
   161          //     ./main.cue:12:11
   162          // #T1.timeSpan.start: non-concrete value float in operand to -:
   163          //     ./main.cue:8:12
   164          //     ./main.cue:6:12
   165          //     ./main.cue:10:12
   166          // #T1.timeSpan.duration: non-concrete value float in operand to -:
   167          //     ./main.cue:9:12
   168          //     ./main.cue:6:12
   169          //     ./main.cue:10:12
   170        }
   171        start: (_|_){
   172          // [incomplete] #T1.timeSpan.start: non-concrete value end for bound <=:
   173          //     ./main.cue:12:11
   174          // #T1.timeSpan.start: non-concrete value float in operand to -:
   175          //     ./main.cue:8:12
   176          //     ./main.cue:6:12
   177          //     ./main.cue:10:12
   178        }
   179        end: (_|_){
   180          // [incomplete] #T1.timeSpan.start: non-concrete value end for bound <=:
   181          //     ./main.cue:12:11
   182          // #T1.timeSpan.start: non-concrete value float in operand to -:
   183          //     ./main.cue:8:12
   184          //     ./main.cue:6:12
   185          //     ./main.cue:10:12
   186        }
   187      }
   188    }
   189    #T2: (#struct){
   190      action: (string){ "Task 2" }
   191      timeSpan: (#struct){
   192        duration: (_|_){
   193          // [incomplete] #T2.timeSpan.start: non-concrete value end for bound <=:
   194          //     ./main.cue:12:11
   195          // #T2.timeSpan.start: non-concrete value float in operand to -:
   196          //     ./main.cue:8:12
   197          //     ./main.cue:6:12
   198          //     ./main.cue:10:12
   199          // #T2.timeSpan.duration: non-concrete value float in operand to -:
   200          //     ./main.cue:9:12
   201          //     ./main.cue:6:12
   202          //     ./main.cue:10:12
   203        }
   204        start: (_|_){
   205          // [incomplete] #T2.timeSpan.start: non-concrete value end for bound <=:
   206          //     ./main.cue:12:11
   207          // #T2.timeSpan.start: non-concrete value float in operand to -:
   208          //     ./main.cue:8:12
   209          //     ./main.cue:6:12
   210          //     ./main.cue:10:12
   211        }
   212        end: (_|_){
   213          // [incomplete] #T2.timeSpan.start: non-concrete value end for bound <=:
   214          //     ./main.cue:12:11
   215          // #T2.timeSpan.start: non-concrete value float in operand to -:
   216          //     ./main.cue:8:12
   217          //     ./main.cue:6:12
   218          //     ./main.cue:10:12
   219        }
   220      }
   221    }
   222    ts: (_|_){
   223      // [eval]
   224      action: (string){ "Task 1 and Task 2" }
   225      #tasks: (_|_){
   226        // [eval]
   227        t1: (_|_){
   228          // [eval]
   229          timeSpan: (_|_){
   230            // [eval]
   231            end: (_|_){
   232              // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   233              //     ./main.cue:6:12
   234              //     ./main.cue:50:19
   235            }
   236            duration: (_|_){
   237              // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   238              //     ./main.cue:6:12
   239              //     ./main.cue:50:19
   240            }
   241            start: (_|_){
   242              // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   243              //     ./main.cue:6:12
   244              //     ./main.cue:50:19
   245            }
   246          }
   247          action: (string){ "Task 1" }
   248        }
   249        t2: (_|_){
   250          // [eval]
   251          timeSpan: (_|_){
   252            // [eval]
   253            end: (_|_){
   254              // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   255              //     ./main.cue:6:12
   256              //     ./main.cue:50:19
   257            }
   258            duration: (_|_){
   259              // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   260              //     ./main.cue:6:12
   261              //     ./main.cue:50:19
   262            }
   263            start: (_|_){
   264              // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   265              //     ./main.cue:6:12
   266              //     ./main.cue:50:19
   267            }
   268          }
   269          action: (string){ "Task 2" }
   270        }
   271      }
   272      timeSpan: (_|_){
   273        // [eval]
   274        start: (_|_){
   275          // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   276          //     ./main.cue:6:12
   277          //     ./main.cue:50:19
   278        }
   279        duration: (_|_){
   280          // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   281          //     ./main.cue:6:12
   282          //     ./main.cue:50:19
   283        }
   284        end: (_|_){
   285          // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   286          //     ./main.cue:6:12
   287          //     ./main.cue:50:19
   288        }
   289      }
   290      tasks: (_|_){
   291        // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   292        //     ./main.cue:6:12
   293        //     ./main.cue:50:19
   294      }
   295    }
   296  }
   297  -- diff/-out/evalalpha<==>+out/eval --
   298  diff old new
   299  --- old
   300  +++ new
   301  @@ -1,9 +1,6 @@
   302   Errors:
   303   ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   304       ./main.cue:6:12
   305  -    ./main.cue:17:12
   306  -    ./main.cue:35:6
   307  -    ./main.cue:49:7
   308       ./main.cue:50:19
   309   
   310   Result:
   311  @@ -11,36 +8,37 @@
   312     // [eval]
   313     #TimeSpan: (#struct){
   314       start: (_|_){
   315  -      // [cycle] cycle error
   316  -      // cycle error:
   317  -      //     ./main.cue:12:9
   318  +      // [incomplete] #TimeSpan.start: non-concrete value end for bound <=:
   319  +      //     ./main.cue:12:11
   320  +      // #TimeSpan.start: non-concrete value float in operand to -:
   321  +      //     ./main.cue:8:12
   322  +      //     ./main.cue:6:12
   323  +      //     ./main.cue:10:12
   324  +      // #TimeSpan.duration: non-concrete value float in operand to -:
   325  +      //     ./main.cue:9:12
   326  +      //     ./main.cue:6:12
   327  +      //     ./main.cue:10:12
   328       }
   329       duration: (_|_){
   330  -      // [cycle] cycle error:
   331  -      //     ./main.cue:9:12
   332  +      // [incomplete] #TimeSpan.start: non-concrete value end for bound <=:
   333  +      //     ./main.cue:12:11
   334  +      // #TimeSpan.duration: non-concrete value float in operand to -:
   335  +      //     ./main.cue:9:12
   336  +      //     ./main.cue:6:12
   337  +      //     ./main.cue:10:12
   338       }
   339       end: (_|_){
   340  -      // [cycle] cycle error:
   341  +      // [incomplete] #TimeSpan.start: non-concrete value end for bound <=:
   342  +      //     ./main.cue:12:11
   343  +      // #TimeSpan.duration: non-concrete value float in operand to -:
   344  +      //     ./main.cue:9:12
   345  +      //     ./main.cue:6:12
   346         //     ./main.cue:10:12
   347       }
   348     }
   349     #Task: (#struct){
   350       action: (string){ string }
   351  -    timeSpan: (#struct){
   352  -      start: (_|_){
   353  -        // [cycle] cycle error
   354  -        // cycle error:
   355  -        //     ./main.cue:12:9
   356  -      }
   357  -      duration: (_|_){
   358  -        // [cycle] cycle error:
   359  -        //     ./main.cue:9:12
   360  -      }
   361  -      end: (_|_){
   362  -        // [cycle] cycle error:
   363  -        //     ./main.cue:10:12
   364  -      }
   365  -    }
   366  +    timeSpan: ~(#TimeSpan)
   367     }
   368     #TaskSet: (#struct){
   369       action: (string){ string }
   370  @@ -48,41 +46,38 @@
   371       }
   372       tasks: (#list){
   373       }
   374  -    timeSpan?: (#struct){
   375  -      start: (_|_){
   376  -        // [cycle] cycle error
   377  -        // cycle error:
   378  -        //     ./main.cue:12:9
   379  -      }
   380  -      duration: (_|_){
   381  -        // [cycle] cycle error:
   382  -        //     ./main.cue:9:12
   383  -      }
   384  -      end: (_|_){
   385  -        // [cycle] cycle error:
   386  -        //     ./main.cue:10:12
   387  -      }
   388  -    }
   389  +    timeSpan?: ~(#TimeSpan)
   390     }
   391     #T1: (#struct){
   392       action: (string){ "Task 1" }
   393       timeSpan: (#struct){
   394  -      start: (_|_){
   395  -        // [cycle] cycle error
   396  -        // cycle error:
   397  -        //     ./main.cue:12:9
   398  -      }
   399  -      duration: (_|_){
   400  -        // [cycle] cycle error:
   401  -        //     ./main.cue:9:12
   402  -      }
   403  -      end: (_|_){
   404  -        // [cycle] cycle error
   405  -        // cycle error:
   406  -        //     ./main.cue:9:12
   407  -        //     ./main.cue:8:12
   408  -        // cycle error:
   409  -        //     ./main.cue:12:9
   410  +      duration: (_|_){
   411  +        // [incomplete] #T1.timeSpan.start: non-concrete value end for bound <=:
   412  +        //     ./main.cue:12:11
   413  +        // #T1.timeSpan.start: non-concrete value float in operand to -:
   414  +        //     ./main.cue:8:12
   415  +        //     ./main.cue:6:12
   416  +        //     ./main.cue:10:12
   417  +        // #T1.timeSpan.duration: non-concrete value float in operand to -:
   418  +        //     ./main.cue:9:12
   419  +        //     ./main.cue:6:12
   420  +        //     ./main.cue:10:12
   421  +      }
   422  +      start: (_|_){
   423  +        // [incomplete] #T1.timeSpan.start: non-concrete value end for bound <=:
   424  +        //     ./main.cue:12:11
   425  +        // #T1.timeSpan.start: non-concrete value float in operand to -:
   426  +        //     ./main.cue:8:12
   427  +        //     ./main.cue:6:12
   428  +        //     ./main.cue:10:12
   429  +      }
   430  +      end: (_|_){
   431  +        // [incomplete] #T1.timeSpan.start: non-concrete value end for bound <=:
   432  +        //     ./main.cue:12:11
   433  +        // #T1.timeSpan.start: non-concrete value float in operand to -:
   434  +        //     ./main.cue:8:12
   435  +        //     ./main.cue:6:12
   436  +        //     ./main.cue:10:12
   437         }
   438       }
   439     }
   440  @@ -89,22 +84,33 @@
   441     #T2: (#struct){
   442       action: (string){ "Task 2" }
   443       timeSpan: (#struct){
   444  -      start: (_|_){
   445  -        // [cycle] cycle error
   446  -        // cycle error:
   447  -        //     ./main.cue:12:9
   448  -      }
   449  -      duration: (_|_){
   450  -        // [cycle] cycle error:
   451  -        //     ./main.cue:9:12
   452  -      }
   453  -      end: (_|_){
   454  -        // [cycle] cycle error
   455  -        // cycle error:
   456  -        //     ./main.cue:9:12
   457  -        //     ./main.cue:8:12
   458  -        // cycle error:
   459  -        //     ./main.cue:12:9
   460  +      duration: (_|_){
   461  +        // [incomplete] #T2.timeSpan.start: non-concrete value end for bound <=:
   462  +        //     ./main.cue:12:11
   463  +        // #T2.timeSpan.start: non-concrete value float in operand to -:
   464  +        //     ./main.cue:8:12
   465  +        //     ./main.cue:6:12
   466  +        //     ./main.cue:10:12
   467  +        // #T2.timeSpan.duration: non-concrete value float in operand to -:
   468  +        //     ./main.cue:9:12
   469  +        //     ./main.cue:6:12
   470  +        //     ./main.cue:10:12
   471  +      }
   472  +      start: (_|_){
   473  +        // [incomplete] #T2.timeSpan.start: non-concrete value end for bound <=:
   474  +        //     ./main.cue:12:11
   475  +        // #T2.timeSpan.start: non-concrete value float in operand to -:
   476  +        //     ./main.cue:8:12
   477  +        //     ./main.cue:6:12
   478  +        //     ./main.cue:10:12
   479  +      }
   480  +      end: (_|_){
   481  +        // [incomplete] #T2.timeSpan.start: non-concrete value end for bound <=:
   482  +        //     ./main.cue:12:11
   483  +        // #T2.timeSpan.start: non-concrete value float in operand to -:
   484  +        //     ./main.cue:8:12
   485  +        //     ./main.cue:6:12
   486  +        //     ./main.cue:10:12
   487         }
   488       }
   489     }
   490  @@ -113,66 +119,73 @@
   491       action: (string){ "Task 1 and Task 2" }
   492       #tasks: (_|_){
   493         // [eval]
   494  -      t1: (#struct){
   495  +      t1: (_|_){
   496  +        // [eval]
   497  +        timeSpan: (_|_){
   498  +          // [eval]
   499  +          end: (_|_){
   500  +            // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   501  +            //     ./main.cue:6:12
   502  +            //     ./main.cue:50:19
   503  +          }
   504  +          duration: (_|_){
   505  +            // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   506  +            //     ./main.cue:6:12
   507  +            //     ./main.cue:50:19
   508  +          }
   509  +          start: (_|_){
   510  +            // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   511  +            //     ./main.cue:6:12
   512  +            //     ./main.cue:50:19
   513  +          }
   514  +        }
   515           action: (string){ "Task 1" }
   516  -        timeSpan: (#struct){
   517  -          start: (float){ -5.2 }
   518  -          duration: (float){ 4.2 }
   519  -          end: (float){ -1.0 }
   520  -        }
   521         }
   522         t2: (_|_){
   523           // [eval]
   524  +        timeSpan: (_|_){
   525  +          // [eval]
   526  +          end: (_|_){
   527  +            // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   528  +            //     ./main.cue:6:12
   529  +            //     ./main.cue:50:19
   530  +          }
   531  +          duration: (_|_){
   532  +            // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   533  +            //     ./main.cue:6:12
   534  +            //     ./main.cue:50:19
   535  +          }
   536  +          start: (_|_){
   537  +            // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   538  +            //     ./main.cue:6:12
   539  +            //     ./main.cue:50:19
   540  +          }
   541  +        }
   542           action: (string){ "Task 2" }
   543  -        timeSpan: (_|_){
   544  -          // [eval]
   545  -          start: (float){ -1.0 }
   546  -          duration: (float){ 120.0 }
   547  -          end: (_|_){
   548  -            // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   549  -            //     ./main.cue:6:12
   550  -            //     ./main.cue:17:12
   551  -            //     ./main.cue:35:6
   552  -            //     ./main.cue:49:7
   553  -            //     ./main.cue:50:19
   554  -          }
   555  -        }
   556  +      }
   557  +    }
   558  +    timeSpan: (_|_){
   559  +      // [eval]
   560  +      start: (_|_){
   561  +        // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   562  +        //     ./main.cue:6:12
   563  +        //     ./main.cue:50:19
   564  +      }
   565  +      duration: (_|_){
   566  +        // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   567  +        //     ./main.cue:6:12
   568  +        //     ./main.cue:50:19
   569  +      }
   570  +      end: (_|_){
   571  +        // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   572  +        //     ./main.cue:6:12
   573  +        //     ./main.cue:50:19
   574         }
   575       }
   576       tasks: (_|_){
   577         // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   578         //     ./main.cue:6:12
   579  -      //     ./main.cue:17:12
   580  -      //     ./main.cue:35:6
   581  -      //     ./main.cue:49:7
   582         //     ./main.cue:50:19
   583       }
   584  -    timeSpan: (_|_){
   585  -      // [eval]
   586  -      start: (_|_){
   587  -        // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   588  -        //     ./main.cue:6:12
   589  -        //     ./main.cue:17:12
   590  -        //     ./main.cue:35:6
   591  -        //     ./main.cue:49:7
   592  -        //     ./main.cue:50:19
   593  -      }
   594  -      duration: (_|_){
   595  -        // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   596  -        //     ./main.cue:6:12
   597  -        //     ./main.cue:17:12
   598  -        //     ./main.cue:35:6
   599  -        //     ./main.cue:49:7
   600  -        //     ./main.cue:50:19
   601  -      }
   602  -      end: (_|_){
   603  -        // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   604  -        //     ./main.cue:6:12
   605  -        //     ./main.cue:17:12
   606  -        //     ./main.cue:35:6
   607  -        //     ./main.cue:49:7
   608  -        //     ./main.cue:50:19
   609  -      }
   610  -    }
   611     }
   612   }
   613  -- out/eval --
   614  Errors:
   615  ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   616      ./main.cue:6:12
   617      ./main.cue:17:12
   618      ./main.cue:35:6
   619      ./main.cue:49:7
   620      ./main.cue:50:19
   621  
   622  Result:
   623  (_|_){
   624    // [eval]
   625    #TimeSpan: (#struct){
   626      start: (_|_){
   627        // [cycle] cycle error
   628        // cycle error:
   629        //     ./main.cue:12:9
   630      }
   631      duration: (_|_){
   632        // [cycle] cycle error:
   633        //     ./main.cue:9:12
   634      }
   635      end: (_|_){
   636        // [cycle] cycle error:
   637        //     ./main.cue:10:12
   638      }
   639    }
   640    #Task: (#struct){
   641      action: (string){ string }
   642      timeSpan: (#struct){
   643        start: (_|_){
   644          // [cycle] cycle error
   645          // cycle error:
   646          //     ./main.cue:12:9
   647        }
   648        duration: (_|_){
   649          // [cycle] cycle error:
   650          //     ./main.cue:9:12
   651        }
   652        end: (_|_){
   653          // [cycle] cycle error:
   654          //     ./main.cue:10:12
   655        }
   656      }
   657    }
   658    #TaskSet: (#struct){
   659      action: (string){ string }
   660      #tasks: (#struct){
   661      }
   662      tasks: (#list){
   663      }
   664      timeSpan?: (#struct){
   665        start: (_|_){
   666          // [cycle] cycle error
   667          // cycle error:
   668          //     ./main.cue:12:9
   669        }
   670        duration: (_|_){
   671          // [cycle] cycle error:
   672          //     ./main.cue:9:12
   673        }
   674        end: (_|_){
   675          // [cycle] cycle error:
   676          //     ./main.cue:10:12
   677        }
   678      }
   679    }
   680    #T1: (#struct){
   681      action: (string){ "Task 1" }
   682      timeSpan: (#struct){
   683        start: (_|_){
   684          // [cycle] cycle error
   685          // cycle error:
   686          //     ./main.cue:12:9
   687        }
   688        duration: (_|_){
   689          // [cycle] cycle error:
   690          //     ./main.cue:9:12
   691        }
   692        end: (_|_){
   693          // [cycle] cycle error
   694          // cycle error:
   695          //     ./main.cue:9:12
   696          //     ./main.cue:8:12
   697          // cycle error:
   698          //     ./main.cue:12:9
   699        }
   700      }
   701    }
   702    #T2: (#struct){
   703      action: (string){ "Task 2" }
   704      timeSpan: (#struct){
   705        start: (_|_){
   706          // [cycle] cycle error
   707          // cycle error:
   708          //     ./main.cue:12:9
   709        }
   710        duration: (_|_){
   711          // [cycle] cycle error:
   712          //     ./main.cue:9:12
   713        }
   714        end: (_|_){
   715          // [cycle] cycle error
   716          // cycle error:
   717          //     ./main.cue:9:12
   718          //     ./main.cue:8:12
   719          // cycle error:
   720          //     ./main.cue:12:9
   721        }
   722      }
   723    }
   724    ts: (_|_){
   725      // [eval]
   726      action: (string){ "Task 1 and Task 2" }
   727      #tasks: (_|_){
   728        // [eval]
   729        t1: (#struct){
   730          action: (string){ "Task 1" }
   731          timeSpan: (#struct){
   732            start: (float){ -5.2 }
   733            duration: (float){ 4.2 }
   734            end: (float){ -1.0 }
   735          }
   736        }
   737        t2: (_|_){
   738          // [eval]
   739          action: (string){ "Task 2" }
   740          timeSpan: (_|_){
   741            // [eval]
   742            start: (float){ -1.0 }
   743            duration: (float){ 120.0 }
   744            end: (_|_){
   745              // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   746              //     ./main.cue:6:12
   747              //     ./main.cue:17:12
   748              //     ./main.cue:35:6
   749              //     ./main.cue:49:7
   750              //     ./main.cue:50:19
   751            }
   752          }
   753        }
   754      }
   755      tasks: (_|_){
   756        // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   757        //     ./main.cue:6:12
   758        //     ./main.cue:17:12
   759        //     ./main.cue:35:6
   760        //     ./main.cue:49:7
   761        //     ./main.cue:50:19
   762      }
   763      timeSpan: (_|_){
   764        // [eval]
   765        start: (_|_){
   766          // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   767          //     ./main.cue:6:12
   768          //     ./main.cue:17:12
   769          //     ./main.cue:35:6
   770          //     ./main.cue:49:7
   771          //     ./main.cue:50:19
   772        }
   773        duration: (_|_){
   774          // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   775          //     ./main.cue:6:12
   776          //     ./main.cue:17:12
   777          //     ./main.cue:35:6
   778          //     ./main.cue:49:7
   779          //     ./main.cue:50:19
   780        }
   781        end: (_|_){
   782          // [eval] ts.#tasks.t2.timeSpan.end: conflicting values 119 and float (mismatched types int and float):
   783          //     ./main.cue:6:12
   784          //     ./main.cue:17:12
   785          //     ./main.cue:35:6
   786          //     ./main.cue:49:7
   787          //     ./main.cue:50:19
   788        }
   789      }
   790    }
   791  }
   792  -- out/compile --
   793  --- main.cue
   794  {
   795    #TimeSpan: {
   796      start: float
   797      duration: float
   798      end: float
   799      start: (〈0;end〉 - 〈0;duration〉)
   800      duration: (〈0;end〉 - 〈0;start〉)
   801      end: (〈0;start〉 + 〈0;duration〉)
   802      start: <=〈0;end〉
   803    }
   804    #Task: {
   805      action: string
   806      timeSpan: 〈1;#TimeSpan〉
   807    }
   808    #TaskSet: {
   809      action: string
   810      #tasks: {
   811        [string]: 〈2;#Task〉
   812      }
   813      tasks: [
   814        for _, v in 〈1;#tasks〉 {
   815          〈1;v〉
   816        },
   817      ]
   818      tasks: [
   819        ...〈2;#Task〉,
   820      ]
   821      timeSpan?: 〈1;#TimeSpan〉
   822    }
   823    #T1: (〈0;#Task〉 & {
   824      action: "Task 1"
   825      timeSpan: (〈1;#TimeSpan〉 & {
   826        duration: 4.2
   827      })
   828    })
   829    #T2: (〈0;#Task〉 & {
   830      action: "Task 2"
   831      timeSpan: (〈1;#TimeSpan〉 & {
   832        duration: 120.0
   833      })
   834    })
   835    ts: 〈0;#TaskSet〉
   836    ts: {
   837      action: "Task 1 and Task 2"
   838      #tasks: {
   839        t1: (〈2;#T1〉 & {
   840          timeSpan: {
   841            end: 〈4〉.#tasks.t2.timeSpan.start
   842          }
   843        })
   844        t2: (〈2;#T2〉 & {
   845          timeSpan: {
   846            end: 119
   847          }
   848        })
   849      }
   850      timeSpan: {
   851        start: 〈2〉.#tasks.t1.timeSpan.start
   852      }
   853    }
   854  }