Feature request: parametric targets in lake
Open
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
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 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