-- in.cue --
result: [for _, v in service {v}] @test(eq, [{
	name: *"foo" | string
	type: "service"
	port: *7080 | int
}, {
	port: 8000
	name: *"bar" | string
	type: "service"
}, {
	name: "foobar"
	type: "service"
	port: *7080 | int
}])

service: [Name=string]: {
	name: *Name | string
	type: "service"
	port: *7080 | int
}
service: foo: {} @test(eq, {
	name: *"foo" | string
	type: "service"
	port: *7080 | int
})
service: bar: {port: 8000} @test(eq, {
	port: 8000
	name: *"bar" | string
	type: "service"
})
service: baz: {name: "foobar"} @test(eq, {
	name: "foobar"
	type: "service"
	port: *7080 | int
})
-- out/eval/stats --
Leaks:  0
Freed:  51
Reused: 43
Allocs: 8
Retain: 4

Unifications: 27
Conjuncts:    70
Disjuncts:    55
