defaultInstance.lean:20:20-20:23: error(lean.synthInstanceFailed): failed to synthesize instance of type class Foo Bool (?m x) Hint: Type class instance resolution failures can be inspected with the `set_option trace.Meta.synthInstance true` command. defaultInstance.lean:22:35-22:38: error: typeclass instance problem is stuck Foo Bool (?m x) Note: Lean will not try to resolve this typeclass instance problem because the second type argument to `Foo` contains metavariables. This argument must be fully determined before Lean will try to resolve the typeclass. Hint: Adding type annotations and supplying implicit arguments to functions can give Lean more information for typeclass resolution. For example, if you have a variable `x` that you intend to be a `Nat`, but Lean reports it as having an unresolved type like `?m`, replacing `x` with `(x : Nat)` can get typeclass resolution un-stuck.