leanprover / leanprover/lean4

RFC: make `Lean.Meta.setInlineAttribute` a `CoreM Unit`

Open
#4,965 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Proposal

In Lean.Meta.Basic

def setInlineAttribute (declName : Name) (kind := Compiler.InlineAttributeKind.inline): MetaM Unit := do
  let env ← getEnv
  match Compiler.setInlineAttribute env declName kind with
  | .ok env    => setEnv env
  | .error msg => throwError msg

It can be made into a CoreM Unit without any modification.

https://github.com/leanprover-community/mathlib4/pull/15474 used the CoreM Unit version of this function.

Community Feedback

(No Zulip discussions yet.)

Impact

Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add 👍 to it.

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 in Lean.Meta.Basic at the definition of setInlineAttribute and compare its current MetaM Unit signature with the proposed CoreM Unit version. Done means the function uses CoreM Unit while preserving its existing inline-attribute behavior; check the referenced mathlib4 pull request for usage context.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.