cuelang.org/go@v0.10.1/cue/testdata/fulleval/013_normalization.txtar (about)

     1  TODO: the new evaluator currently does not normalize disjuncts.
     2  It needs to be determined under which circumstances is desirable.
     3  The redundancy that remains from not normalizing can be useful.
     4  
     5  #name: normalization
     6  #evalFull
     7  -- in.cue --
     8  a: string | string
     9  b: *1 | *int
    10  c: *1.0 | *float
    11  -- out/def --
    12  a: string
    13  b: int
    14  c: float
    15  -- out/legacy-debug --
    16  <0>{a: string, b: int, c: float}
    17  -- out/compile --
    18  --- in.cue
    19  {
    20    a: (string|string)
    21    b: (*1|*int)
    22    c: (*1.0|*float)
    23  }
    24  -- out/eval/stats --
    25  Leaks:  0
    26  Freed:  10
    27  Reused: 6
    28  Allocs: 4
    29  Retain: 0
    30  
    31  Unifications: 4
    32  Conjuncts:    10
    33  Disjuncts:    10
    34  -- out/eval --
    35  (struct){
    36    a: (string){ string }
    37    b: (int){ |(*(int){ 1 }, *(int){ int }) }
    38    c: (float){ |(*(float){ 1.0 }, *(float){ float }) }
    39  }