Navigation

PiDom::not-a-type

Key: PiDom::not-a-type

Category: sort · Severity: error

Source: src/diag/hints.nix:858

the domain of Π must be a type (live in some U(k)), not a term or value. Supply a type expression like nat, bool, u 0, or a user-defined datatype.

Example

Hint::PiDom::not-a-type means the PiDom position uses a term or value where the checker needs a type. The example shows the failing form first, then one way to give the checker the missing structure.

# Bad: a Pi domain must be a type, not a term.
pi (natLit 0) (_: nat)

# Better: put a type in the domain.
pi nat (_: nat)

← All diagnostic hints