lean4-htt/tests/lean/decEqMutualInductives.lean
Arthur Adjedj 6b93f05cd1
feat : derive DecidableEq for mutual inductives (#2591)
* feat : derive `DecidableEq` for mutual inductives

* doc: document `RELEASES.md`

---------
2023-10-03 02:17:13 +00:00

27 lines
579 B
Text

/-! Verify that the derive handler for `DecidableEq` handles mutual inductive types-/
-- Print the generated derivations
set_option trace.Elab.Deriving.decEq true
mutual
inductive Tree : Type :=
| node : ListTree → Tree
inductive ListTree : Type :=
| nil : ListTree
| cons : Tree → ListTree → ListTree
deriving DecidableEq
end
mutual
inductive Foo₁ : Type :=
| foo₁₁ : Foo₁
| foo₁₂ : Foo₂ → Foo₁
deriving DecidableEq
inductive Foo₂ : Type :=
| foo₂ : Foo₃ → Foo₂
inductive Foo₃ : Type :=
| foo₃ : Foo₁ → Foo₃
end