treat simp? and simp! like simp

This commit is contained in:
Alexander Bentkamp
2023-03-01 11:37:34 +01:00
parent bf7c68d4f9
commit bc6c4a57e7
@@ -76,6 +76,7 @@ partial def findForbiddenTactics (inputCtx : Parser.InputContext) (levelParams :
-- ignore syntax elements that do not start with a letter -- ignore syntax elements that do not start with a letter
-- and ignore "with" keyword -- and ignore "with" keyword
if 0 < val.length ∧ val.data[0]!.isAlpha ∧ val != "with" ∧ val != "at" then if 0 < val.length ∧ val.data[0]!.isAlpha ∧ val != "with" ∧ val != "at" then
let val := val.dropRightWhile (fun c => c == '!' || c == '?') -- treat `simp?` and `simp!` like `simp`
match levelParams.tactics.find? (fun t => t.name.toString == val) with match levelParams.tactics.find? (fun t => t.name.toString == val) with
| none => addErrorMessage info s!"You have not unlocked the tactic '{val}' yet!" | none => addErrorMessage info s!"You have not unlocked the tactic '{val}' yet!"
| some tac => | some tac =>