Navigation

Elem::refinement-failed

Key: Elem::refinement-failed

Category: refinement · Severity: error

Source: src/diag/hints.nix:904

the element violates the element type's refinement predicate

Example

Hint::Elem::refinement-failed means the Elem position contains a value that fails the refinement predicate. The example shows the failing form first, then one way to give the checker the missing structure.

# Bad: one element fails the element refinement.
PositiveList.validate [ 1 -2 3 ]

# Better: every element satisfies the refinement.
PositiveList.validate [ 1 2 3 ]

← All diagnostic hints