Navigation

DRecTail::not-a-desc

Key: DRecTail::not-a-desc

Category: description · Severity: error

Source: src/diag/hints.nix:856

the tail position of rec must itself be a description, not an ordinary term. Continue the spine with descRet, descArg, descRec, descPi, or descPlus.

Example

Hint::DRecTail::not-a-desc means the DRecTail position uses an ordinary term where the checker needs a Desc. The example shows the failing form first, then one way to give the checker the missing structure.

# Bad: the tail after a recursive position is a term.
descRec i (natLit 0)

# Better: continue with another description.
descRec i (descRet i)

← All diagnostic hints