feat: add Extras.Graph, ported from the Flix standard library - #2
Merged
Merged
Conversation
Ports the Graph module and its tests from the Flix compiler repository (main/src/library/Graph.flix, identical to the v0.75.3 release). The only change to the source is the module name, which is now Extras.Graph; the only change to the tests is an added `use Extras.Graph`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YRutVsR79myxEkpYp7CCqA
magnus-madsen
added a commit
to flix/flix
that referenced
this pull request
Sep 12, 2026
The Graph module now lives in the flix/extras package as Extras.Graph (flix/extras#2). Remove it, and its tests, from the standard library. The flix/extras package is already part of the community build, so the extracted module keeps being compiled on every PR. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EUFSuSB8yJ9vdhvuBXzYht
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
Extras.Graph, a port of theGraphmodule from the Flix standard library, together with its full test suite.What is ported
src/Extras/Graph.flixis a copy of the compiler'smain/src/library/Graph.flix, which is byte-identical to thev0.75.3release. The only change is the module declaration, nowpub mod Extras.Graph. The original copyright header is preserved.test/TestGraph.flixis a copy of the compiler'sTestGraph.flixwith one added line,use Extras.Graph. All 165 tests are included unchanged.src/Extras.flixand the README list the new module.Name resolution
Flix 0.75.3 still ships its own
Graphmodule, souse Extras.Graphin the tests has to shadow it. Verified with a separate probe in which the extras version deliberately differed from the standard library: the call resolved toExtras.Graph. The ported tests therefore exercise the code in this repository.Testing
Ran
checkandtestwith the Flix 0.75.3 jar.🤖 Generated with Claude Code
https://claude.ai/code/session_01YRutVsR79myxEkpYp7CCqA