Document: referencing a kernel base type from a user ADT ctor field requires full qualification #65

Closed
opened 2026-06-02 13:23:49 +02:00 by Brummel · 0 comments
Owner

From series-step1 fieldtest (spec_gap). Bare Series works in type-position via kernel auto-import, but a user ADT whose ctor field references a kernel base type must fully-qualify it: (con raw_buf.RawBuf (con T)) checks, while bare (con RawBuf (con T)) is a type-mismatch and (own (RawBuf a)) in a field is a parse error. The kernel-tier series module itself uses bare (con RawBuf a) (works because it is kernel-tier and the element is a type variable). This asymmetry (bare type-position OK, bare ctor-field-ref not OK) is not stated on the public surface. Document the rule in model 0007 or contract 0002-data-model. Entry path: ratify / tighten ledger.

From series-step1 fieldtest (spec_gap). Bare `Series` works in type-position via kernel auto-import, but a user ADT whose ctor field references a kernel base type must fully-qualify it: `(con raw_buf.RawBuf (con T))` checks, while bare `(con RawBuf (con T))` is a type-mismatch and `(own (RawBuf a))` in a field is a parse error. The kernel-tier `series` module itself uses bare `(con RawBuf a)` (works because it is kernel-tier and the element is a type variable). This asymmetry (bare type-position OK, bare ctor-field-ref not OK) is not stated on the public surface. Document the rule in model 0007 or contract 0002-data-model. Entry path: ratify / tighten ledger.
Sign in to join this conversation.