leanprover / leanprover/lean4

Widgets: `ToHtmlFormat`

Open
#680 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement P-medium server
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

As some of the Lean 3 widget features are rolling in, we should decide on the next step. I think a good one would be to provide a typeclass which will allow users to visualize types as HTML. Specifically, we would have a Html type with something like

class ToHtmlFormat (α : Type u) where
  formatHtml : α → Html

On encountering a value of type which implements ToHtmlFormat, the infoview would render it as the HTML output. This is not yet the fully programmable widgets feature, but I think it will go a long way towards visualizations such as Dynkin diagrams (zulip).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the proposed ToHtmlFormat class and the linked vscode-lean4 widget PR. Determine how an Html value should be represented and how the infoview should render values implementing the class; the work is done when the proposed visualization behavior is defined and integrated for such values.

Written by the indexing model from the issue text.

Assessment

Domain
compilers, developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.