Calc widget #
This file redefines the calc
tactic so that it displays a widget panel allowing to create
new calc steps with holes specified by selected sub-expressions in the goal.
Code action to create a calc
tactic from the current goal.
Equations
- One or more equations did not get rendered due to their size.
- createCalc _params _snap ctx _stack node = pure #[]
Instances For
Parameters for the calc widget.
- pos : Lean.Lsp.Position
- goals : Array Lean.Widget.InteractiveGoal
- selectedLocations : Array Lean.SubExpr.GoalsLocation
- replaceRange : Lean.Lsp.Range
- isFirst : Bool
Is this the first calc step?
- indent : Nat
indentation level of the calc block.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- CalcParams.instRpcEncodable = { rpcEncode := CalcParams.instRpcEncodable.enc✝, rpcDecode := CalcParams.instRpcEncodable.dec✝ }
def
suggestSteps
(pos : Array Lean.SubExpr.GoalsLocation)
(goalType : Lean.Expr)
(params : CalcParams)
:
Return the link text and inserted text above and below of the calc widget.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Rpc function for the calc widget.
Equations
- CalcPanel.rpc = mkSelectionPanelRPC suggestSteps "Please select subterms." "Calc 🔍"
Instances For
The calc widget.
Equations
- One or more equations did not get rendered due to their size.