merge again
This commit is contained in:
@@ -82,8 +82,8 @@ elab "Statement" statementName:ident ? descr:str sig:declSig val:declVal : comma
|
||||
elabCommand thmStatement
|
||||
modifyCurLevel fun level => pure {level with
|
||||
goal := sig,
|
||||
description := descr.getString,
|
||||
ppStatement := match statementName with
|
||||
descrText := descr.getString,
|
||||
descrFormat := match statementName with
|
||||
| none => "example " ++ (toString <| reprint sig.raw) ++ " := by"
|
||||
| some name => (Format.join ["lemma ", reprint name.raw, " ", reprint sig.raw, " := by"]).pretty 10 -- "lemma " ++ (toString <| reprint name.raw) ++ " " ++ (Format.pretty (reprint sig.raw) 40) ++ " := by"
|
||||
} -- Format.pretty <| format thmStatement.raw }
|
||||
|
||||
@@ -202,7 +202,8 @@ structure GameLevel where
|
||||
lemmas: Array LemmaDocEntry := default
|
||||
messages: Array GoalMessageEntry := default
|
||||
goal : TSyntax `Lean.Parser.Command.declSig := default
|
||||
ppStatement : String := default
|
||||
descrText: String := default
|
||||
descrFormat : String := default
|
||||
deriving Inhabited, Repr
|
||||
|
||||
/-! ## World -/
|
||||
|
||||
@@ -41,8 +41,8 @@ structure LevelInfo where
|
||||
tactics: Array TacticDocEntry
|
||||
lemmas: Array LemmaDocEntry
|
||||
introduction : String
|
||||
description : String
|
||||
ppStatement : String
|
||||
descrText : String := ""
|
||||
descrFormat : String := ""
|
||||
deriving ToJson
|
||||
|
||||
structure LoadLevelParams where
|
||||
@@ -70,8 +70,8 @@ partial def handleServerEvent (ev : ServerEvent) : GameServerM Bool := do
|
||||
title := lvl.title,
|
||||
tactics := lvl.tactics,
|
||||
lemmas := lvl.lemmas,
|
||||
description := lvl.description,
|
||||
ppStatement := lvl.ppStatement --toExpr <| format (lvl.goal.raw) --toString <| Syntax.formatStx (lvl.goal.raw) --Syntax.formatStx (lvl.goal.raw) , -- TODO
|
||||
descrText := lvl.descrText,
|
||||
descrFormat := lvl.descrFormat --toExpr <| format (lvl.goal.raw) --toString <| Syntax.formatStx (lvl.goal.raw) --Syntax.formatStx (lvl.goal.raw) , -- TODO
|
||||
introduction := lvl.introduction }
|
||||
c.hOut.writeLspResponse ⟨id, ToJson.toJson levelInfo⟩
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user