Repository navigation
selfhost: port range sums and overload compatibility core to Flow - #660
Merged
Merged
Conversation
godofecht
marked this pull request as ready for review
August 21, 2026 19:47
This was referenced Aug 22, 2026
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.
Ports two deterministic Python compiler slices into the Stage-A Flow compiler:
src/flow/range_sums.pyarithmetic progression normalization, closed-form sums, CRT intersection, and two-range union/intersection sum helpers ->compiler/src/range_sums.flowsrc/flow/overload.pyoverload type-compatibility predicates, span/array/pointer compatibility, capability compatibility, primitive/int vocabulary, and integer-literal widening predicate ->compiler/src/overload.flowThe Python AST/object-graph layers remain the reference host for now; this PR moves the pure compiler logic first, matching the existing self-hosting strategy used by FIR/LSP/proof helper ports.
Adds direct Flow tests under
tests/lang/for ascending/descending ranges, zero-step signalling, CRT intersections, union sums, pointer/array/span compatibility, null pointer adoption, capabilities, and literal widening.Bootstrap note: these are new modules and are not imported by
compiler/src/main.flow, so the checked-in Stage-A bootstrap should remain byte-identical; CI fixed-point verification is expected to confirm that before this leaves draft.