# PiCod::not-a-type


**Key:** `PiCod::not-a-type`

**Category:** sort · **Severity:** error

**Source:** [`src/diag/hints.nix:860`](https://github.com/kleisli-io/nix-effects/blob/main/src/diag/hints.nix#L860)

the codomain family of Π must return a type for each argument, not an ordinary value. Provide a function whose body inhabits some `U k`.

## Example

`Hint::PiCod::not-a-type` means the `PiCod` 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.

```nix
# Bad: the codomain family returns a term.
pi nat (_: natLit 0)

# Better: the codomain family returns a type.
pi nat (_: nat)

```


---

[← All diagnostic hints](/nix-effects/diag-hints)
