-- cue.mod/module.cue --
module: "mod.test/test"
language: version: "v0.9.0"
-- sub/sub.cue --
package sub

User: "sub"
-- in.cue --
import "mod.test/test/sub"

root: {
	a: {
		$id: "valToOut"
		val: "foo \(sub.User)"
		out: string
	}
	b: {
		$id:    "valToOut"
		$after: a
		val:    "bar"
		out:    string
	}
	c: {
		$id: "valToOut"
		out: a.out + b.out
	}
}
-- out/run/errors --
-- out/run/t0 --
graph TD
  t0("root.a [Ready]")
  t1("root.b [Waiting]")
  t1-->t0
  t2("root.c [Waiting]")
  t2-->t0
  t2-->t1

-- out/run/t1 --
graph TD
  t0("root.a [Terminated]")
  t1("root.b [Ready]")
  t1-->t0
  t2("root.c [Waiting]")
  t2-->t0
  t2-->t1

-- out/run/t1/value --
{
	$id: "valToOut"
	val: "foo sub"
	out: "foo sub"
}
-- out/run/t2 --
graph TD
  t0("root.a [Terminated]")
  t1("root.b [Terminated]")
  t1-->t0
  t2("root.c [Ready]")
  t2-->t0
  t2-->t1

-- out/run/t2/value --
{
	$id: "valToOut"
	$after: {
		$id: "valToOut"
		val: "foo sub"
		out: "foo sub"
	}
	val: "bar"
	out: "bar"
}
-- out/run/t3 --
graph TD
  t0("root.a [Terminated]")
  t1("root.b [Terminated]")
  t1-->t0
  t2("root.c [Terminated]")
  t2-->t0
  t2-->t1

-- out/run/t3/value --
{
	$id: "valToOut"
	out: "foo subbar"
}
-- out/run/t1/stats --
Leaks:  0
Freed:  17
Reused: 12
Allocs: 5
Retain: 0

Unifications: 17
Conjuncts:    30
Disjuncts:    17
-- out/run/t2/stats --
Leaks:  0
Freed:  17
Reused: 17
Allocs: 0
Retain: 0

Unifications: 17
Conjuncts:    31
Disjuncts:    17
-- out/run/t3/stats --
Leaks:  0
Freed:  0
Reused: 0
Allocs: 0
Retain: 0

Unifications: 0
Conjuncts:    0
Disjuncts:    0
-- out/run/stats/totals --
Leaks:  0
Freed:  34
Reused: 29
Allocs: 5
Retain: 0

Unifications: 34
Conjuncts:    61
Disjuncts:    34
