# JType::type-mismatch


**Key:** `JType::type-mismatch`

**Category:** type-mismatch · **Severity:** error

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

the type parameter of `J` must match the type of its two endpoints

## Example

`Hint::JType::type-mismatch` means the `JType` position supplies a term whose type does not match the expected type. The example shows the failing form first, then one way to give the checker the missing structure.

```nix
# Bad: J's type argument does not match the endpoints.
J bool motive refl zero zero p

# Better: use the endpoints' shared type.
J nat motive refl zero zero p

```


---

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