-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add conv zoom button #4
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KaseQuark here's a review of your code 🙂
|
||
open Except in | ||
/-- Get the raw subexpression withotu performing any instantiation. -/ | ||
private def viewCoordRaw: Nat → Expr → Except String Expr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now in core
| c, e => error s!"Bad coordinate {c} for {e}" | ||
|
||
/-- Decodes a subexpression `Pos` as a sequence of coordinates. See `Pos.encode` for details.-/ | ||
private def decode (p : Nat) : Array Nat := |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also in core
return { expr := retexpr, val? := toString ((listParam.head!) + 1), listRest := listParam.tail! , test := "generic\n" } | ||
|
||
def buildConvZoomCommands (subexprParam : SubexprInfo) (goalParam : InteractiveGoal) : MetaM (ConvZoomCommands) := do | ||
let mut ret := "/-\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please indent decl bodies
deriving Inhabited | ||
|
||
private def solveLevel (expr : Expr) (listParam : List Nat) : MetaM (SolveReturn) := match expr with | ||
| e@(Expr.app _ _ _) => do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
|
||
structure ConvZoomCommands where | ||
commands? : Option String | ||
deriving RpcEncoding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use deriving ToJson, FromJson
The `[inlineIfReduce]` at `List.toArrayAux` is currently very expensive, and this example produces a deep recursion when inlining the `List.toArrayAux` applications.
…ments that have been inferred when applying congr theorem see leanprover#1711
TODO: improve support for instance implicit arguments at `congr`
… the end of syntax
No description provided.