Skip to content

[ refactor ] Port Yaffle's Value#3754

Draft
GulinSS wants to merge 25 commits intoidris-lang:mainfrom
GulinSS:core-evaluate-value/all
Draft

[ refactor ] Port Yaffle's Value#3754
GulinSS wants to merge 25 commits intoidris-lang:mainfrom
GulinSS:core-evaluate-value/all

Conversation

@GulinSS
Copy link
Copy Markdown
Contributor

@GulinSS GulinSS commented Mar 17, 2026

This PR tracks the ongoing effort to port Yaffle into the Idris2 codebase.

Work in progress — This PR is primarily for tracking progress. The current state is outdated and incomplete.

This PR requires the following to be merged first: #3513

PR commits will be squashed into a series of less number of commits to improve maintainability during rebases and ease review.


Squashed, origin: https://github.com/GulinSS/Idris2/tree/core-evaluate-value/all-no-compact

GulinSS and others added 5 commits March 15, 2026 10:08
Co-authored-by: Justus Matthiesen <mail@justusmatthiesen.com>
Replace List-based tracking of erased variables with specialized VarSet type for improved performance. Changes include:

- Update getErased function in Env.idr to return VarSet instead of List
- Modify linear check functions to use VarSet operations throughout
- Add elemNat helper for efficient natural number lookups in VarSet
- Use VarSet.empty constant instead of empty lists
- Apply proper weakening operations with varSetWeaken interface

This improves efficiency of linearity checking by using specialized set operations instead of list traversals.
+ Cherry-picked refactor from #16

Co-authored-by: Viktor Yudov <me@spcfox.com>

fix
- generalised lookup
- define resolveRef as the weakening of findBound, add missing cases to substName
- define underBinders, fix argument order
- added underBinderz, more GenWeakenable instances
- complete refactors regarding swapping inner/outer
- change constructor argument representation from Scope to List Name

Co-authored-by: Justus Matthiesen <mail@justusmatthiesen.com>
@GulinSS GulinSS force-pushed the core-evaluate-value/all branch from 3577754 to fe23002 Compare March 17, 2026 15:10
@GulinSS GulinSS force-pushed the core-evaluate-value/all branch from fe23002 to 67977e6 Compare March 24, 2026 21:57
@GulinSS
Copy link
Copy Markdown
Contributor Author

GulinSS commented Mar 24, 2026

Well, it was hard to rebase but still need some care to clean up comments, logs and so on. It was hard... no much to say for now. 😅

@GulinSS GulinSS force-pushed the core-evaluate-value/all branch 2 times, most recently from 4faa6f3 to 64cd3ae Compare March 26, 2026 13:59
Co-authored-by: Viktor Yudov <me@spcfox.com>
Co-authored-by: Denis Buzdalov <public@buzden.ru>
@GulinSS GulinSS force-pushed the core-evaluate-value/all branch from 64cd3ae to a2720d0 Compare March 26, 2026 15:58
@GulinSS GulinSS force-pushed the core-evaluate-value/all branch from 6632c4a to e747679 Compare March 31, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants