011 trellis variant guard

○ Planned This feature is planned but not yet implemented.

OWED: std/trellis:guard refuses a variant request that fails the bound trellis.

Failure Output

error[KORU122]: transform `init` declares no variants, but the call site selects `|gpu`
  fix: declare `~proc init|gpu { ... }` next to the transform, or drop the tag

Code

input.k

Error output must contain

flow requests variant "gpu" but does not satisfy trellis "gpu-legal": std/kernel:step is not gpu-legal

Flows

flow ~define click a branch to expand · @labels scroll to their anchor
define (expr: "gpu-legal")
flow ~guard click a branch to expand · @labels scroll to their anchor
guard (variant: "gpu", trellis: "gpu-legal")
flow ~shape click a branch to expand · @labels scroll to their anchor
shape (expr: Body, source: mass: f64,)
flow ~init click a branch to expand · @labels scroll to their anchor
init|gpu (expr: Body, source: { mass: 1.0 },)