Skip to content

feat: add Extras.DelayList and Extras.DelayMap, ported from the Flix standard library - #3

Merged
magnus-madsen merged 1 commit into
masterfrom
feat/extras-delaylist-delaymap
Sep 12, 2026
Merged

magnus-madsen merged 1 commit into
masterfrom
feat/extras-delaylist-delaymap

Conversation

@magnus-madsen

Copy link
Copy Markdown
Member

Adds Extras.DelayList and Extras.DelayMap, ports of the DelayList and DelayMap modules from the Flix standard library, together with their full test suites.

What is ported

  • src/Extras/DelayList.flix and src/Extras/DelayMap.flix are copies of the compiler's main/src/library/DelayList.flix and DelayMap.flix, both byte-identical to the v0.75.3 release. The only change in each is the module declaration, now under Extras. The original copyright headers are preserved.
  • test/TestDelayList.flix and test/TestDelayMap.flix are copies of the compiler's tests. The only changes are the use lines pointing at the extras modules; the DelayList tests import the enum tags via use Extras.DelayList.{ENil, ECons, LCons, LList}. All 550 and 287 tests are included unchanged.
  • src/Extras.flix and the README list the new modules.

Dependencies outside the standard library

Checked against the v0.75.3 tag before porting:

  • Every RedBlackTree function DelayMap calls is pub, with no @Internal annotation.
  • Purity2, Purity3, and the Map constructor used by DelayMap and its tests are pub.
  • The @Experimental, @Lazy, @LazyWhenPure, @Parallel, and @ParallelWhenPure annotations are recognized by the compiler with no stdlib-only restriction.

Name resolution

Flix 0.75.3 still ships its own DelayList and DelayMap. For DelayList the tests necessarily exercise the extras copy: the tags come explicitly from Extras.DelayList and are passed to DelayList functions, which would not type-check against the standard library's distinct type. For DelayMap, resolution relies on the same use shadowing rule verified with a probe in #2.

Testing

Ran check and test with the Flix 0.75.3 jar.

Suite Passed Failed
TestDelayList 550 0
TestDelayMap 287 0
TestGraph 165 0
TestQueue 30 0

🤖 Generated with Claude Code

https://claude.ai/code/session_01YRutVsR79myxEkpYp7CCqA

…standard library

Ports the DelayList and DelayMap modules and their tests from the Flix
compiler repository (main/src/library/, identical to the v0.75.3 release).
The only change to each source file is the module name, now under Extras;
the only change to the tests is the `use` lines pointing at the extras
modules.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YRutVsR79myxEkpYp7CCqA
@magnus-madsen
magnus-madsen merged commit 9f636c6 into master Sep 12, 2026
1 check passed
@magnus-madsen
magnus-madsen deleted the feat/extras-delaylist-delaymap branch September 12, 2026 18:06
magnus-madsen added a commit to flix/flix that referenced this pull request Sep 12, 2026
The DelayList and DelayMap modules now live in the flix/extras package as
Extras.DelayList and Extras.DelayMap (flix/extras#3).
Remove them, and their tests, from the standard library. The flix/extras
package is already part of the community build, so the extracted modules
keep being compiled on every PR.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EUFSuSB8yJ9vdhvuBXzYht
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.

1 participant