Navigation

Motive.PiDom::not-a-type

Key: Motive.PiDom::not-a-type

Category: sort · Severity: error

Source: src/diag/hints.nix:931

the motive's domain must be a type (live in some U(k)). The motive receives the scrutinee's type as its domain and returns a type; supply a concrete type such as nat, u 0, or the datatype being eliminated.

Example

Hint::Motive.PiDom::not-a-type means the PiDom position under Motive 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: the motive's Pi domain is a term.
motive = pi (natLit 0) (_: u 0)

# Better: the motive's Pi domain is a type.
motive = pi nat (_: u 0)

← All diagnostic hints