lean-ja / lean-ja/lean-by-example
暗黙引数を無視する`#check`コマンドの亜種
Open
Nobody has claimed this yet.
コード例
メタプログラミング
- Dominant language
- Lean
- Stars
- 188
- Forks
- 15
- Avg merge
- 9h 8m
- Merged PRs (30d)
- 6
Description
import Lean
open Lean Elab Command PrettyPrinter Delaborator in
elab tk:"#check' " name:ident : command => runTermElabM fun _ => do
for c in (← realizeGlobalConstWithInfos name) do
addCompletionInfo <| .id name name.getId (danglingDot := false) {} none
let info ← getConstInfo c
let delab : Delab := do
delabForallParamsWithSignature fun binders type => do
let binders := binders.filter fun binder => binder.raw.isOfKind ``Parser.Term.explicitBinder
return ⟨← `(declSigWithId| $(mkIdent c) $binders* : $type)⟩
logInfoAt tk <| .ofFormatWithInfosM (PrettyPrinter.ppExprWithInfos (delab := delab) info.type)
#check' id
-- id (a : α) : α
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the #check' command elaborator shown in the issue and compare its behavior with the existing #check command. Run the #check' id example; done means implicit parameters are omitted while explicit parameters and the type remain in the output.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100