Skip to content

Commit

Permalink
fix(init/meta/interactive_base): add missing parser_desc combinators (#…
Browse files Browse the repository at this point in the history
…676)

Add some missing combinators that were unearthed when switching on the unprintable tactic linter leanprover-community/mathlib3#11725 .
  • Loading branch information
digama0 committed Jan 31, 2022
1 parent f17d6c4 commit bc954fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions library/init/meta/interactive_base.lean
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ private meta def parser_desc_aux : expr → tactic (list format)
| `(pure ._) := return []
| `(._ <$> %%p) := parser_desc_aux p
| `(skip_info %%p) := parser_desc_aux p
| `(._ <$ %%p) := parser_desc_aux p
| `(set_goal_info_pos %%p) := parser_desc_aux p
| `(with_desc %%desc %%p) := list.ret <$> eval_expr format desc
| `(%%p₁ <*> %%p₂) := do
Expand All @@ -124,6 +125,10 @@ private meta def parser_desc_aux : expr → tactic (list format)
f₁ ← parser_desc_aux p₁,
f₂ ← parser_desc_aux p₂,
return $ concat f₁ f₂
| `(%%p₁ >> %%p₂) := do
f₁ ← parser_desc_aux p₁,
f₂ ← parser_desc_aux p₂,
return $ concat f₁ f₂
| `(many %%p) := do
f ← parser_desc_aux p,
return [maybe_paren f ++ "*"]
Expand Down

0 comments on commit bc954fc

Please sign in to comment.