Skip to content

Commit

Permalink
Revert "DisableTheorem and co. should not warn if doc does not exist"
Browse files Browse the repository at this point in the history
This reverts commit 381930e.
  • Loading branch information
joneugster committed Mar 14, 2024
1 parent f55581a commit 6cdbfbd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions server/GameServer/Commands.lean
Original file line number Diff line number Diff line change
Expand Up @@ -250,44 +250,44 @@ elab "NewDefinition" args:ident* : command => do
This is ignored if `OnlyTactic` is set. -/
elab "DisabledTactic" args:ident* : command => do
checkCommandNotDuplicated ((←getCurLevel).tactics.disabled) "DisabledTactic"
-- for name in ↑args do checkInventoryDoc .Tactic name
for name in ↑args do checkInventoryDoc .Tactic name
modifyCurLevel fun level => pure {level with
tactics := {level.tactics with disabled := args.map (·.getId)}}

/-- Declare theorems that are temporarily disabled in this level.
This is ignored if `OnlyTheorem` is set. -/
elab "DisabledTheorem" args:ident* : command => do
checkCommandNotDuplicated ((←getCurLevel).lemmas.disabled) "DisabledTheorem"
-- for name in ↑args do checkInventoryDoc .Lemma name
for name in ↑args do checkInventoryDoc .Lemma name
modifyCurLevel fun level => pure {level with
lemmas := {level.lemmas with disabled := args.map (·.getId)}}

/-- Declare definitions that are temporarily disabled in this level -/
elab "DisabledDefinition" args:ident* : command => do
checkCommandNotDuplicated ((←getCurLevel).definitions.disabled) "DisabledDefinition"
-- for name in ↑args do checkInventoryDoc .Definition name
for name in ↑args do checkInventoryDoc .Definition name
modifyCurLevel fun level => pure {level with
definitions := {level.definitions with disabled := args.map (·.getId)}}

/-- Temporarily disable all tactics except the ones declared here -/
elab "OnlyTactic" args:ident* : command => do
checkCommandNotDuplicated ((←getCurLevel).tactics.only) "OnlyTactic"
-- for name in ↑args do checkInventoryDoc .Tactic name
for name in ↑args do checkInventoryDoc .Tactic name
modifyCurLevel fun level => pure {level with
tactics := {level.tactics with only := args.map (·.getId)}}

/-- Temporarily disable all theorems except the ones declared here -/
elab "OnlyTheorem" args:ident* : command => do
checkCommandNotDuplicated ((←getCurLevel).lemmas.only) "OnlyTheorem"
-- for name in ↑args do checkInventoryDoc .Lemma name
for name in ↑args do checkInventoryDoc .Lemma name
modifyCurLevel fun level => pure {level with
lemmas := {level.lemmas with only := args.map (·.getId)}}

/-- Temporarily disable all definitions except the ones declared here.
This is ignored if `OnlyDefinition` is set. -/
elab "OnlyDefinition" args:ident* : command => do
checkCommandNotDuplicated ((←getCurLevel).definitions.only) "OnlyDefinition"
-- for name in ↑args do checkInventoryDoc .Definition name
for name in ↑args do checkInventoryDoc .Definition name
modifyCurLevel fun level => pure {level with
definitions := {level.definitions with only := args.map (·.getId)}}

Expand Down
Binary file removed server/graph.pdf
Binary file not shown.

0 comments on commit 6cdbfbd

Please sign in to comment.