File: .lake/packages/proofwidgets/ProofWidgets/Presentation/Expr.lean

full_name: ProofWidgets.ExprPresenter.present
code: /-- An `Expr` presenter is similar to a delaborator but outputs HTML trees instead of syntax, and
the output HTML can contain elements which interact with the original `Expr` in some way. We call
interactive outputs with a reference to the original input *presentations*. -/
structure ExprPresenter where
  /-- A user-friendly name for this presenter. For example, "LaTeX". -/
  userName : String
  /-- Whether the output HTML has inline (think something which fits in the space normally occupied
  by an `Expr`, e.g. LaTeX) or block (think large diagram which needs dedicated space) layout. -/
  layoutKind : LayoutKind := .block
  present : Expr → MetaM Html
goal: Lean.Expr → Lean.MetaM ProofWidgets.Html

full_name: ProofWidgets.ExprPresenter
code: /-- An `Expr` presenter is similar to a delaborator but outputs HTML trees instead of syntax, and
the output HTML can contain elements which interact with the original `Expr` in some way. We call
interactive outputs with a reference to the original input *presentations*. -/
structure ExprPresenter where
  /-- A user-friendly name for this presenter. For example, "LaTeX". -/
  userName : String
  /-- Whether the output HTML has inline (think something which fits in the space normally occupied
  by an `Expr`, e.g. LaTeX) or block (think large diagram which needs dedicated space) layout. -/
  layoutKind : LayoutKind := .block
  present : Expr → MetaM Html
goal: Type

full_name: ProofWidgets.ExprPresenter.userName
code: /-- An `Expr` presenter is similar to a delaborator but outputs HTML trees instead of syntax, and
the output HTML can contain elements which interact with the original `Expr` in some way. We call
interactive outputs with a reference to the original input *presentations*. -/
structure ExprPresenter where
  /-- A user-friendly name for this presenter. For example, "LaTeX". -/
  userName : String
  /-- Whether the output HTML has inline (think something which fits in the space normally occupied
  by an `Expr`, e.g. LaTeX) or block (think large diagram which needs dedicated space) layout. -/
  layoutKind : LayoutKind := .block
  present : Expr → MetaM Html
goal: String

full_name: ProofWidgets.ExprPresenter.layoutKind
code: /-- An `Expr` presenter is similar to a delaborator but outputs HTML trees instead of syntax, and
the output HTML can contain elements which interact with the original `Expr` in some way. We call
interactive outputs with a reference to the original input *presentations*. -/
structure ExprPresenter where
  /-- A user-friendly name for this presenter. For example, "LaTeX". -/
  userName : String
  /-- Whether the output HTML has inline (think something which fits in the space normally occupied
  by an `Expr`, e.g. LaTeX) or block (think large diagram which needs dedicated space) layout. -/
  layoutKind : LayoutKind := .block
  present : Expr → MetaM Html
goal: ProofWidgets.LayoutKind

full_name: ProofWidgets.exprPresenters
code: /-- Register an Expr presenter. It must have the type `ProofWidgets.ExprPresenter`. -/
initialize exprPresenters : TagAttribute ←
  registerTagAttribute `expr_presenter
    "Register an Expr presenter. It must have the type `ProofWidgets.ExprPresenter`."
    (validate := fun nm => do
      let const ← getConstInfo nm
      if !const.type.isConstOf ``ExprPresenter then
        throwError m!"type mismatch, expected {mkConst ``ExprPresenter} but got {const.type}"
      return ())
goal: Lean.TagAttribute

full_name: ProofWidgets.initFn._@..lake.packages.proofwidgets.ProofWidgets.Presentation.Expr._hyg.37
code: /-- Register an Expr presenter. It must have the type `ProofWidgets.ExprPresenter`. -/
initialize exprPresenters : TagAttribute ←
  registerTagAttribute `expr_presenter
    "Register an Expr presenter. It must have the type `ProofWidgets.ExprPresenter`."
    (validate := fun nm => do
      let const ← getConstInfo nm
      if !const.type.isConstOf ``ExprPresenter then
        throwError m!"type mismatch, expected {mkConst ``ExprPresenter} but got {const.type}"
      return ())
goal: IO Lean.TagAttribute

full_name: _private.«.lake».packages.proofwidgets.ProofWidgets.Presentation.Expr.0.ProofWidgets.evalExprPresenterUnsafe
code: private unsafe def evalExprPresenterUnsafe (env : Environment) (opts : Options)
    (constName : Name) : Except String ExprPresenter 
goal: Except String ProofWidgets.ExprPresenter

full_name: ProofWidgets.evalExprPresenter
code: @[implemented_by evalExprPresenterUnsafe]
opaque evalExprPresenter (env : Environment) (opts : Options) (constName : Name) :
  Except String ExprPresenter
goal: Except String ProofWidgets.ExprPresenter

full_name: ProofWidgets.GetExprPresentationsParams.expr
code: structure GetExprPresentationsParams where
  expr : WithRpcRef ExprWithCtx
  deriving RpcEncodable
goal: Lean.Server.WithRpcRef ProofWidgets.ExprWithCtx

full_name: ProofWidgets.GetExprPresentationsParams
code: structure GetExprPresentationsParams where
  expr : WithRpcRef ExprWithCtx
  deriving RpcEncodable
goal: Type

full_name: ProofWidgets.ProofWidgets.GetExprPresentationsParams.instFromJsonRpcEncodablePacket
code: RpcEncodable
goal: Lean.FromJson ProofWidgets.ProofWidgets.GetExprPresentationsParams.RpcEncodablePacket✝

full_name: ProofWidgets.ProofWidgets.GetExprPresentationsParams.instRpcEncodableGetExprPresentationsParams.dec._@..lake.packages.proofwidgets.ProofWidgets.Presentation.Expr._hyg.196
code: RpcEncodable
goal: Lean.Json → ExceptT String (ReaderT Lean.Server.RpcObjectStore Id) ProofWidgets.GetExprPresentationsParams

full_name: ProofWidgets.ProofWidgets.GetExprPresentationsParams.instToJsonRpcEncodablePacket
code: RpcEncodable
goal: Lean.ToJson ProofWidgets.ProofWidgets.GetExprPresentationsParams.RpcEncodablePacket✝

full_name: ProofWidgets.ProofWidgets.GetExprPresentationsParams.RpcEncodablePacket._@..lake.packages.proofwidgets.ProofWidgets.Presentation.Expr._hyg.196
code: RpcEncodable
goal: Type

full_name: ProofWidgets.ProofWidgets.GetExprPresentationsParams.instRpcEncodableGetExprPresentationsParams
code: RpcEncodable
goal: Lean.Server.RpcEncodable ProofWidgets.GetExprPresentationsParams

full_name: ProofWidgets.ProofWidgets.GetExprPresentationsParams.instRpcEncodableGetExprPresentationsParams.enc._@..lake.packages.proofwidgets.ProofWidgets.Presentation.Expr._hyg.196
code: RpcEncodable
goal: ProofWidgets.GetExprPresentationsParams → StateM Lean.Server.RpcObjectStore Lean.Json

full_name: ProofWidgets.ExprPresentationData
code: structure ExprPresentationData where
  name : Name
  userName : String
  html : Html
  deriving RpcEncodable
goal: Type

full_name: ProofWidgets.ExprPresentationData.userName
code: structure ExprPresentationData where
  name : Name
  userName : String
  html : Html
  deriving RpcEncodable
goal: String

full_name: ProofWidgets.ExprPresentationData.name
code: structure ExprPresentationData where
  name : Name
  userName : String
  html : Html
  deriving RpcEncodable
goal: Lean.Name

full_name: ProofWidgets.ExprPresentationData.html
code: structure ExprPresentationData where
  name : Name
  userName : String
  html : Html
  deriving RpcEncodable
goal: ProofWidgets.Html

full_name: ProofWidgets.ProofWidgets.ExprPresentationData.instFromJsonRpcEncodablePacket
code: RpcEncodable
goal: Lean.FromJson ProofWidgets.ProofWidgets.ExprPresentationData.RpcEncodablePacket✝

full_name: ProofWidgets.ProofWidgets.ExprPresentationData.instToJsonRpcEncodablePacket
code: RpcEncodable
goal: Lean.ToJson ProofWidgets.ProofWidgets.ExprPresentationData.RpcEncodablePacket✝

full_name: ProofWidgets.ProofWidgets.ExprPresentationData.instRpcEncodableExprPresentationData
code: RpcEncodable
goal: Lean.Server.RpcEncodable ProofWidgets.ExprPresentationData

full_name: ProofWidgets.ProofWidgets.ExprPresentationData.instRpcEncodableExprPresentationData.enc._@..lake.packages.proofwidgets.ProofWidgets.Presentation.Expr._hyg.451
code: RpcEncodable
goal: ProofWidgets.ExprPresentationData → StateM Lean.Server.RpcObjectStore Lean.Json

full_name: ProofWidgets.ProofWidgets.ExprPresentationData.instRpcEncodableExprPresentationData.dec._@..lake.packages.proofwidgets.ProofWidgets.Presentation.Expr._hyg.451
code: RpcEncodable
goal: Lean.Json → ExceptT String (ReaderT Lean.Server.RpcObjectStore Id) ProofWidgets.ExprPresentationData

full_name: ProofWidgets.ProofWidgets.ExprPresentationData.RpcEncodablePacket._@..lake.packages.proofwidgets.ProofWidgets.Presentation.Expr._hyg.451
code: RpcEncodable
goal: Type

full_name: ProofWidgets.ExprPresentations
code: structure ExprPresentations where
  presentations : Array ExprPresentationData
  deriving RpcEncodable
goal: Type

full_name: ProofWidgets.ExprPresentations.presentations
code: structure ExprPresentations where
  presentations : Array ExprPresentationData
  deriving RpcEncodable
goal: Array ProofWidgets.ExprPresentationData

full_name: ProofWidgets.ProofWidgets.ExprPresentations.instRpcEncodableExprPresentations.dec._@..lake.packages.proofwidgets.ProofWidgets.Presentation.Expr._hyg.963
code: RpcEncodable
goal: Lean.Json → ExceptT String (ReaderT Lean.Server.RpcObjectStore Id) ProofWidgets.ExprPresentations

full_name: ProofWidgets.ProofWidgets.ExprPresentations.instToJsonRpcEncodablePacket
code: RpcEncodable
goal: Lean.ToJson ProofWidgets.ProofWidgets.ExprPresentations.RpcEncodablePacket✝

full_name: ProofWidgets.ProofWidgets.ExprPresentations.instRpcEncodableExprPresentations
code: RpcEncodable
goal: Lean.Server.RpcEncodable ProofWidgets.ExprPresentations

full_name: ProofWidgets.ProofWidgets.ExprPresentations.instFromJsonRpcEncodablePacket
code: RpcEncodable
goal: Lean.FromJson ProofWidgets.ProofWidgets.ExprPresentations.RpcEncodablePacket✝

full_name: ProofWidgets.ProofWidgets.ExprPresentations.instRpcEncodableExprPresentations.enc._@..lake.packages.proofwidgets.ProofWidgets.Presentation.Expr._hyg.963
code: RpcEncodable
goal: ProofWidgets.ExprPresentations → StateM Lean.Server.RpcObjectStore Lean.Json

full_name: ProofWidgets.ProofWidgets.ExprPresentations.RpcEncodablePacket._@..lake.packages.proofwidgets.ProofWidgets.Presentation.Expr._hyg.963
code: RpcEncodable
goal: Type

full_name: ProofWidgets.getExprPresentations
code: @[server_rpc_method]
def getExprPresentations : GetExprPresentationsParams → RequestM (RequestTask ExprPresentations)
  
goal: ProofWidgets.GetExprPresentationsParams → Lean.Server.RequestM (Lean.Server.RequestTask ProofWidgets.ExprPresentations)

full_name: ProofWidgets.getExprPresentations.addPresenterIfApplicable
code: @[server_rpc_method]
def getExprPresentations : GetExprPresentationsParams → RequestM (RequestTask ExprPresentations)
  
goal: Lean.Server.RequestM (Array ProofWidgets.ExprPresentationData)

full_name: ProofWidgets.GetExprPresentationParams.name
code: structure GetExprPresentationParams where
  expr : WithRpcRef ExprWithCtx
  /-- Name of the presenter to use. -/
  name : Name
  deriving RpcEncodable
goal: Lean.Name

full_name: ProofWidgets.GetExprPresentationParams.expr
code: structure GetExprPresentationParams where
  expr : WithRpcRef ExprWithCtx
  /-- Name of the presenter to use. -/
  name : Name
  deriving RpcEncodable
goal: Lean.Server.WithRpcRef ProofWidgets.ExprWithCtx

full_name: ProofWidgets.GetExprPresentationParams
code: structure GetExprPresentationParams where
  expr : WithRpcRef ExprWithCtx
  /-- Name of the presenter to use. -/
  name : Name
  deriving RpcEncodable
goal: Type

full_name: ProofWidgets.ProofWidgets.GetExprPresentationParams.instRpcEncodableGetExprPresentationParams.dec._@..lake.packages.proofwidgets.ProofWidgets.Presentation.Expr._hyg.1699
code: RpcEncodable
goal: Lean.Json → ExceptT String (ReaderT Lean.Server.RpcObjectStore Id) ProofWidgets.GetExprPresentationParams

full_name: ProofWidgets.ProofWidgets.GetExprPresentationParams.instToJsonRpcEncodablePacket
code: RpcEncodable
goal: Lean.ToJson ProofWidgets.ProofWidgets.GetExprPresentationParams.RpcEncodablePacket✝

full_name: ProofWidgets.ProofWidgets.GetExprPresentationParams.RpcEncodablePacket._@..lake.packages.proofwidgets.ProofWidgets.Presentation.Expr._hyg.1699
code: RpcEncodable
goal: Type

full_name: ProofWidgets.ProofWidgets.GetExprPresentationParams.instFromJsonRpcEncodablePacket
code: RpcEncodable
goal: Lean.FromJson ProofWidgets.ProofWidgets.GetExprPresentationParams.RpcEncodablePacket✝

full_name: ProofWidgets.ProofWidgets.GetExprPresentationParams.instRpcEncodableGetExprPresentationParams
code: RpcEncodable
goal: Lean.Server.RpcEncodable ProofWidgets.GetExprPresentationParams

full_name: ProofWidgets.ProofWidgets.GetExprPresentationParams.instRpcEncodableGetExprPresentationParams.enc._@..lake.packages.proofwidgets.ProofWidgets.Presentation.Expr._hyg.1699
code: RpcEncodable
goal: ProofWidgets.GetExprPresentationParams → StateM Lean.Server.RpcObjectStore Lean.Json

full_name: ProofWidgets.getExprPresentation
code: @[server_rpc_method]
def getExprPresentation : GetExprPresentationParams → RequestM (RequestTask Html)
  
goal: ProofWidgets.GetExprPresentationParams → Lean.Server.RequestM (Lean.Server.RequestTask ProofWidgets.Html)

full_name: ProofWidgets.ExprPresentationProps
code: structure ExprPresentationProps where
  expr : WithRpcRef ExprWithCtx
  deriving RpcEncodable
goal: Type

full_name: ProofWidgets.ExprPresentationProps.expr
code: structure ExprPresentationProps where
  expr : WithRpcRef ExprWithCtx
  deriving RpcEncodable
goal: Lean.Server.WithRpcRef ProofWidgets.ExprWithCtx

full_name: ProofWidgets.ProofWidgets.ExprPresentationProps.RpcEncodablePacket._@..lake.packages.proofwidgets.ProofWidgets.Presentation.Expr._hyg.2273
code: RpcEncodable
goal: Type

full_name: ProofWidgets.ProofWidgets.ExprPresentationProps.instFromJsonRpcEncodablePacket
code: RpcEncodable
goal: Lean.FromJson ProofWidgets.ProofWidgets.ExprPresentationProps.RpcEncodablePacket✝

full_name: ProofWidgets.ProofWidgets.ExprPresentationProps.instRpcEncodableExprPresentationProps
code: RpcEncodable
goal: Lean.Server.RpcEncodable ProofWidgets.ExprPresentationProps

full_name: ProofWidgets.ProofWidgets.ExprPresentationProps.instRpcEncodableExprPresentationProps.dec._@..lake.packages.proofwidgets.ProofWidgets.Presentation.Expr._hyg.2273
code: RpcEncodable
goal: Lean.Json → ExceptT String (ReaderT Lean.Server.RpcObjectStore Id) ProofWidgets.ExprPresentationProps

full_name: ProofWidgets.ProofWidgets.ExprPresentationProps.instToJsonRpcEncodablePacket
code: RpcEncodable
goal: Lean.ToJson ProofWidgets.ProofWidgets.ExprPresentationProps.RpcEncodablePacket✝

full_name: ProofWidgets.ProofWidgets.ExprPresentationProps.instRpcEncodableExprPresentationProps.enc._@..lake.packages.proofwidgets.ProofWidgets.Presentation.Expr._hyg.2273
code: RpcEncodable
goal: ProofWidgets.ExprPresentationProps → StateM Lean.Server.RpcObjectStore Lean.Json

full_name: ProofWidgets.ExprPresentation
code: /-- This component shows a selection of all known and applicable `ProofWidgets.ExprPresenter`s which
are used to render the expression when selected. The one with highest precedence (TODO) is shown by
default. -/
@[widget_module]
def ExprPresentation : Component ExprPresentationProps 
goal: ProofWidgets.Component ProofWidgets.ExprPresentationProps