Skip to content

Conversation

@GulinSS
Copy link
Contributor

@GulinSS GulinSS commented Mar 19, 2025

Introduces the actual swap of List on SnocList for Scope.

Should this change go in the CHANGELOG?

  • If this is a fix, user-facing change, a compiler change, or a new paper
    implementation, I have updated CHANGELOG_NEXT.md (and potentially also
    CONTRIBUTORS.md).

@GulinSS
Copy link
Contributor Author

GulinSS commented Mar 25, 2025

@spcfox prepared a report of building packages.

TLDR; all builds reached complete step of compilation. 🎉

@GulinSS GulinSS force-pushed the scoped-snoc-list-swap branch 4 times, most recently from bed6788 to ff61ad5 Compare April 21, 2025 13:29
@GulinSS GulinSS force-pushed the scoped-snoc-list-swap branch from ff61ad5 to 9367788 Compare May 12, 2025 11:42
@GulinSS GulinSS force-pushed the scoped-snoc-list-swap branch from 9367788 to 5278b55 Compare June 3, 2025 07:20
@GulinSS GulinSS marked this pull request as ready for review June 3, 2025 07:22
@GulinSS GulinSS force-pushed the scoped-snoc-list-swap branch from 33f2799 to 749fa54 Compare June 5, 2025 07:16
@GulinSS
Copy link
Contributor Author

GulinSS commented Jun 5, 2025

@mjustus
@gallais

Kindly asking for the review! 🙏

@gallais
Copy link
Member

gallais commented Jun 5, 2025

Be aware that it may take a while!

Next week is the TYPES conference
The week after that is the CALCO/MFPS joint conferences

We may be able to meet after that but then annual leave may kick in (I'll be away late June to early July).

@GulinSS GulinSS force-pushed the scoped-snoc-list-swap branch from 749fa54 to c128cdf Compare July 8, 2025 07:25
@GulinSS GulinSS force-pushed the scoped-snoc-list-swap branch from c128cdf to cf57ff6 Compare July 17, 2025 13:45
@GulinSS
Copy link
Contributor Author

GulinSS commented Jul 22, 2025

@gallais a reminder at the middle/end of July probably after annual leave

@gallais
Copy link
Member

gallais commented Jul 29, 2025

We're meeting tomorrow for a first go at this PR.

@GulinSS
Copy link
Contributor Author

GulinSS commented Aug 8, 2025

@gallais
@mjustus

should we solve these conflicts or better wait the review?

@mjustus
Copy link
Collaborator

mjustus commented Aug 8, 2025

I think solving merge conflicts later is the better approach. We tend to do some refactoring during review (e.g. PR #3593) when we spot opportunities that are too tempting to ignore but those shouldn't be too difficult to merge. I am sure Guillaume and I can help resolving conflicts once we are done reviewing.

EDIT: wrong PR number.

@GulinSS
Copy link
Contributor Author

GulinSS commented Aug 19, 2025

hm, I've tried to track the changes but this commit is unclear for me. Could you put more info there?

@gallais
@mjustus

@gallais
Copy link
Member

gallais commented Aug 20, 2025

That last one is ongoing changes that are not thematically linked beyond being part of the review as a whole.
We reset the commit before each new session, moving pure refactoring commits past it and then add it back
on with all the stuff we've accumulated during the day to it.

@GulinSS
Copy link
Contributor Author

GulinSS commented Aug 26, 2025

@gallais
@mjustus

FYI Not-so-trivial rebase may occur here

@spcfox
Copy link
Contributor

spcfox commented Aug 26, 2025

FYI Not-so-trivial rebase may occur here

I can help with that

@GulinSS
Copy link
Contributor Author

GulinSS commented Sep 4, 2025

@gallais
@mjustus

Might be better to merge current refactor progress "as is"?

@gallais
Copy link
Member

gallais commented Sep 4, 2025

The new academic year is about to start so unfortunately I don't think I'll be able to come back to this for a while.

@GulinSS
Copy link
Contributor Author

GulinSS commented Sep 4, 2025

The new academic year is about to start so unfortunately I don't think I'll be able to come back to this for a while.

I mean I could take the branch, make a rebase, and finally propose all these changes to merge at this pr. What do you think?

@GulinSS
Copy link
Contributor Author

GulinSS commented Oct 31, 2025

I've collected commits from mjustus@3578f70, then added holes to make it compilable as is to see the needed surface to fix. Applied trivial fixes. Working on filling holes.

@GulinSS GulinSS force-pushed the scoped-snoc-list-swap branch 2 times, most recently from 9b903ec to edbdf25 Compare November 4, 2025 17:11
@GulinSS
Copy link
Contributor Author

GulinSS commented Nov 5, 2025

@mjustus
@gallais

I've rolled out your refactor intentions over the full codebase and now it compiles just fine, see CI. Actually it only compiles now, not work. My next steps are focused on coming back the working state.

Howbeit I noted that your refactor ideas are a very delicious and at same time pretty accurate. I think while I am busy on coming back working state (that's why I moved this issue to Draft state again) it would be perfect if you would come with more.

I know your time is limited but the deal is to get more your ideas and implement them by my hands as I can.

cc @buzden

@GulinSS GulinSS marked this pull request as draft November 5, 2025 08:51
@GulinSS GulinSS force-pushed the scoped-snoc-list-swap branch 5 times, most recently from e01b32a to dde0bf4 Compare November 16, 2025 11:14
@GulinSS GulinSS force-pushed the scoped-snoc-list-swap branch from f7ed03c to 0c882af Compare November 21, 2025 23:17
GulinSS and others added 12 commits November 25, 2025 20:41
+ Cherry-picked refactor from #16

Co-authored-by: Viktor Yudov <[email protected]>
… List Name

This refactor changes the representation of constructor arguments throughout the compiler from `Scope` to `List Name`. This simplifies the API and reduces complexity in handling variable indices.

Key changes:
- Updated `MkConAlt` and related types to use `List Name` instead of `Scope` for constructor arguments
- Modified variable binding and weakening operations to work with list-based arguments
- Adjusted pattern matching and case analysis code throughout the compiler
- Added new helper functions for list-based variable operations

The change affects multiple compiler modules including ANF, LambdaLift, CaseOpts, and optimization passes, ensuring consistent handling of constructor arguments across the compilation pipeline.
@GulinSS GulinSS force-pushed the scoped-snoc-list-swap branch from f77ebd4 to 5b57541 Compare November 26, 2025 09:01
@GulinSS
Copy link
Contributor Author

GulinSS commented Nov 27, 2025

Short list of all test errors ATM:

idris2/basic/basic055
base/data_bits001
contrib/list_alternating
chez/channels008
chez/chez004
chez/integers
chez/chez032
chez/chez027
refc/buffer
refc/integers
refc/strings
node/node024
node/node004
node/integers

Unfortunately, I am unable to reproduce them locally.
crush.Dockerfile.txt

But locally my list of bad tests are:

chez/channels009
chez/channels008
chez/futures001

Continue digging.

@GulinSS GulinSS force-pushed the scoped-snoc-list-swap branch from de1736f to 2b055b7 Compare December 1, 2025 19:40
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.

4 participants