@@ -54,7 +54,7 @@ Providing the use access to a Lean instance running on the server is a severe se
|
||||
|
||||
## Credits
|
||||
|
||||
The project has pimarily been developed by Alexander Bentkamp and Jon Eugster.
|
||||
The project has primarily been developed by Alexander Bentkamp and Jon Eugster.
|
||||
|
||||
It is based on ideas from the [Lean Game Maker](https://github.com/mpedramfar/Lean-game-maker) and the [Natural Number Game
|
||||
(NNG)](https://www.ma.imperial.ac.uk/~buzzard/xena/natural_number_game/)
|
||||
|
||||
@@ -21,7 +21,7 @@ def abstractCtx (goal : MVarId) : MetaM AbstractCtxResult := do
|
||||
def openAbstractCtxResult (res : AbstractCtxResult) (k : Array Expr → Expr → MetaM α) : MetaM α := do
|
||||
let (_mvars, _binderInfo, expr) ← openAbstractMVarsResult res.abstractMVarsResult
|
||||
lambdaLetTelescope (← instantiateMVars expr) k
|
||||
-- TODO: Unfornately, lambdaLetTelescope does not allow us to provide the number of arguments.
|
||||
-- TODO: Unfortunately, lambdaLetTelescope does not allow us to provide the number of arguments.
|
||||
-- If the goal is a function, this will not work.
|
||||
|
||||
end AbstractCtx
|
||||
|
||||
@@ -119,7 +119,7 @@ elab "Languages" t:str* : command => do
|
||||
modifyCurGame fun game => pure {game with
|
||||
tile := {game.tile with languages := t.map (·.getString) |>.toList}}
|
||||
|
||||
/-- The Image of the game (optional). TODO: Not impementeds -/
|
||||
/-- The Image of the game (optional). TODO: Not implemented -/
|
||||
elab "CoverImage" t:str : command => do
|
||||
let file := t.getString
|
||||
if not <| ← System.FilePath.pathExists file then
|
||||
@@ -610,7 +610,7 @@ where filterArgs (args : List Syntax) : List Syntax :=
|
||||
| Syntax.node _ `GameServer.Tactic.Hint _ :: _ :: r
|
||||
| Syntax.node _ `GameServer.Tactic.Branch _ :: _ :: r =>
|
||||
filterArgs r
|
||||
-- delete `Hint` and `Branch` occurence at the end of the tactic sequence.
|
||||
-- delete `Hint` and `Branch` occurrence at the end of the tactic sequence.
|
||||
| Syntax.node _ `GameServer.Tactic.Hint _ :: []
|
||||
| Syntax.node _ `GameServer.Tactic.Branch _ :: [] =>
|
||||
[]
|
||||
|
||||
@@ -187,7 +187,7 @@ partial def findForbiddenTactics (inputCtx : Parser.InputContext) (workerState :
|
||||
|
||||
where addMessageByDifficulty (info : SourceInfo) (s : MessageData) :=
|
||||
-- See `GameServer.FileWorker.WorkerState.difficulty`. Send nothing/warnings/errors
|
||||
-- deppending on difficulty.
|
||||
-- depending on difficulty.
|
||||
let difficulty := workerState.difficulty
|
||||
if difficulty > 0 then
|
||||
addMessage info inputCtx (if difficulty > 1 then .error else .warning) s
|
||||
@@ -383,7 +383,7 @@ def publishProofState (m : DocumentMeta) (snap : Snapshot) (initParams : Lsp.Ini
|
||||
-- -- Should we get the diags from there?
|
||||
-- let diag : Array Widget.InteractiveDiagnostic := snap.interactiveDiags.toArray
|
||||
|
||||
-- -- Level is completed if there are no errrors or warnings
|
||||
-- -- Level is completed if there are no errors or warnings
|
||||
-- let completed : Bool := ¬ diag.any (fun d =>
|
||||
-- d.severity? == some .error ∨ d.severity? == some .warning)
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ def getProofState (_ : Lsp.PlainGoalParams) : RequestM (RequestTask (Option Proo
|
||||
-- Answer: The last snap only copied the diags from the end of this snap
|
||||
let mut diag : Array InteractiveDiagnostic := snap.interactiveDiags.toArray
|
||||
|
||||
-- Level is completed if there are no errrors or warnings
|
||||
-- Level is completed if there are no errors or warnings
|
||||
let completedWithWarnings : Bool := ¬ diag.any (·.severity? == some .error)
|
||||
let completed : Bool := completedWithWarnings ∧ ¬ diag.any (·.severity? == some .warning)
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ def _root_.Lean.MVarId.letIntros (mvarId : MVarId) : MetaM (Array FVarId × MVar
|
||||
mvarId.introNP n
|
||||
|
||||
/--
|
||||
`let_intros` introduces all `let` statements that are preceeding the proof. Concretely
|
||||
`let_intros` introduces all `let` statements that are preceding the proof. Concretely
|
||||
it does a subset of what `intros` does.
|
||||
|
||||
If names are provided, it will introduce as many `let` statements as there are names.
|
||||
|
||||
Reference in New Issue
Block a user