...

Text file src/cuelang.org/go/cue/testdata/fulleval/013_normalization.txtar

Documentation: cuelang.org/go/cue/testdata/fulleval

     1TODO: the new evaluator currently does not normalize disjuncts.
     2It needs to be determined under which circumstances is desirable.
     3The redundancy that remains from not normalizing can be useful.
     4
     5#name: normalization
     6#evalFull
     7-- in.cue --
     8a: string | string
     9b: *1 | *int
    10c: *1.0 | *float
    11-- out/def --
    12a: string
    13b: int
    14c: 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 --
    25Leaks:  0
    26Freed:  10
    27Reused: 6
    28Allocs: 4
    29Retain: 0
    30
    31Unifications: 4
    32Conjuncts:    10
    33Disjuncts:    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}

View as plain text