Ship

Lexicon · Kind

Kind

A kind is the "sort" of a type-level thing — what classifies a type the way a type classifies a value.

KindClassifiesMembers
Typethe type of a valueInt, User, `[ :a \:b ],fn() -> Unit`
Rowa structural channel fragment`:a \:b, the row variable'r`
Signaturea complete function descriptora sig 'f binder
Constructor (Type -> Type, …)a type still needing argumentsVector, Option, Map
  • An ordinary type variable 'a has kind Type (the zero-ceremony default).

  • A row variable 'r has kind Row; it can never unify with a Type.

  • Keep kind (what sort a variable is) separate from constraint (what it can do, e.g. an inline 'a: Ordered function binder).

  • A row is at kind Row; wrapping it in [ … ] produces a kind-Type open variant.

  • open 'r on a binder constrains 'r to instantiate to an open-variant Type (not that 'r has kind Row in the binder list) — see open-binder.md. The same open shape can be inferred from an open-only use such as Timed('r).

  • Ordinary relative callbacks need no explicit effect variable. APIs that deliberately transform channels may bind rows or a complete sig explicitly; see effect-row.md and ../10-services.md.

    See variant.md and ../02-type-inference.md.