///|
/// Stdlib collection-type heads whose generic parameters Apple Pkl
/// strips from rejection diagnostics (`List` → `List`,
/// `Map` → `Map`). User-defined generic classes keep
/// their parameters since the diagnostic is the only place that
/// parameter text appears.
fn is_stdlib_collection_head(name : String) -> Bool {
  match name {
    "List" | "Listing" | "Set" | "Map" | "Mapping" | "Collection" | "Pair" =>
      true
    _ => false
  }
}

///|
/// Normalise a type annotation for use inside a rejection diagnostic
/// (`Expected value of type \`