lean4-htt/tests/lean/run/mutualWithMacro.lean
Sebastian Ullrich 271c8ab9cb
fix: macros unfolding to multiple commands inside mutual (#9649)
This PR fixes an issue where a macro unfolding to multiple commands
would not be accepted inside `mutual`
2025-07-31 21:00:53 +00:00

26 lines
447 B
Text

module
/-! Macros unfolding to legal `mutual` element(s) are accepted by `mutual`. -/
macro "single" name:ident arg:ident : command =>
`(inductive $name where | mk : $arg → $name)
mutual
single Foo Bar
inductive Bar where
| mk : Foo → Bar
end
macro "double" name1:ident name2:ident : command =>
`(inductive $name1 where | mk : $name2 → $name1
inductive $name2 where | mk : $name1 → $name2)
mutual
double Foo2 Bar2
end