Design decisions

260. Counter reaches programs through the prelude's use, not a compiler type name (2026-11-22)

  • Decision. Counter leaves the checker's TYPE_NAMES and its Ty::Named row; spec/std/prelude.cp imports std.hashmap.{Counter} like any std type, so a program's own struct Counter shadows it.
  • Why. Q3 (a): a std struct is not storage, I/O, bits or a numeric primitive. The by-name trait rows in check.rs and check/types.rs stay until std traits replace them (tech-debt worklog). No code path changes, so no perf gate: counts still lowers to its own counter.
  • Reverse. Put "Counter" back in TYPE_NAMES and the Ty::Named row in crates/cpl-check/src/prelude.rs, and drop the prelude use.