# Elem::refinement-failed


**Key:** `Elem::refinement-failed`

**Category:** refinement · **Severity:** error

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

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.

```nix
# 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](/nix-effects/diag-hints)
