leanprover / leanprover/lean4

RFC: Lean.Exception should implement Lean.ToMessageData

Open
#12,784 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

RFC
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

Proposal

Lean.Exception should implement Lean.ToMessageData. Lean.Exception already has an associated function called toMessagData.

  • User Experience: This is a useful type-class that makes working with Lean.Exception nicer, and users probably expect it, and it makes it easier to discover that exceptions can be converted to message data.

  • Beneficiaries: Users making technical projects with meta-programming and learners.

  • Maintainability: I believe this only simplifies things and does not take much maintenance.

If there is a reason this instance wasn't written, at least we should add the explanation to the documentation.

Community Feedback
Impact

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 locating the definitions of Lean.Exception, Lean.ToMessageData, and the existing toMessagData function. Check how nearby type-class instances are documented and tested; done means the proposed instance works for Lean.Exception, with an explanation added if the instance is intentionally not appropriate.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.