
-- x.cue --
package x

#C1: {
	name: string
}

#C2: {
	#C1
	age: int
}

c1: #C1 & {
	name: "cueckoo"
}

c2: #C2 & {
	c1
	age: 5
}
-- out/eval/stats --
Leaks:  0
Freed:  11
Reused: 8
Allocs: 3
Retain: 0

Unifications: 11
Conjuncts:    27
Disjuncts:    11
-- out/evalalpha --
(struct){
  #C1: (#struct){
    name: (string){ string }
  }
  #C2: (#struct){
    age: (int){ int }
    name: (string){ string }
  }
  c1: (#struct){
    name: (string){ "cueckoo" }
  }
  c2: (#struct){
    age: (int){ 5 }
    name: (string){ "cueckoo" }
  }
}
-- diff/-out/evalalpha<==>+out/eval --
diff old new
--- old
+++ new
@@ -3,14 +3,14 @@
     name: (string){ string }
   }
   #C2: (#struct){
-    name: (string){ string }
     age: (int){ int }
+    name: (string){ string }
   }
   c1: (#struct){
     name: (string){ "cueckoo" }
   }
   c2: (#struct){
-    name: (string){ "cueckoo" }
     age: (int){ 5 }
+    name: (string){ "cueckoo" }
   }
 }
-- diff/explanation --
Reordering
-- out/eval --
(struct){
  #C1: (#struct){
    name: (string){ string }
  }
  #C2: (#struct){
    name: (string){ string }
    age: (int){ int }
  }
  c1: (#struct){
    name: (string){ "cueckoo" }
  }
  c2: (#struct){
    name: (string){ "cueckoo" }
    age: (int){ 5 }
  }
}
-- out/compile --
--- x.cue
{
  #C1: {
    name: string
  }
  #C2: {
    〈1;#C1〉
    age: int
  }
  c1: (〈0;#C1〉 & {
    name: "cueckoo"
  })
  c2: (〈0;#C2〉 & {
    〈1;c1〉
    age: 5
  })
}
