leanprover / leanprover/lean4

Feature request: parametric targets in lake

Open
#2,759 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently Lake seems to reject a statement such as

target myTarget (pkg : Package) (arg : Nat) : FilePath := ...

We can write

def myTarget (pkg : Package) (arg : Nat) [Fact (pkg.name = _package.name)] : IndexBuildM (BuildJob FilePath) := ...

but it would be nice if the DSL supported 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 with Lake's target DSL and compare the shown target myTarget form with the def myTarget workaround. Done means the DSL supports parameterized targets with the stated Package and Nat parameters while preserving target construction.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.