Change pythonToLaurel and pythonToCore to take Array stmt#645
Merged
joehendrix merged 2 commits intomainfrom Mar 25, 2026
Merged
Change pythonToLaurel and pythonToCore to take Array stmt#645joehendrix merged 2 commits intomainfrom
joehendrix merged 2 commits intomainfrom
Conversation
9685c55 to
ea6d9ff
Compare
4ea02a9 to
73c3b63
Compare
085e2e5 to
7ab67c5
Compare
Accept an Array of Python statements instead of a Command/Program wrapper so callers control how modules are unwrapped. This removes the assumption that translation always starts from a single Module command and makes the API more composable. - pythonToLaurel' and pythonToLaurel now take Array (stmt SourceRange) instead of Python.Command SourceRange - pythonToCore now takes Array (stmt SourceRange) instead of Strata.Program; remove toPyCommands and unwrapModule from PythonToCore - signaturesToLaurel modulePrefix parameter is now required (no default) to ensure callers explicitly choose the right prefix - Move toPyCommands/unwrapModule to call sites (StrataMain, PySpecPipeline, IdentifyOverloadsTest) where the unwrapping context is clear Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7ab67c5 to
b836340
Compare
shigoel
reviewed
Mar 25, 2026
shigoel
approved these changes
Mar 25, 2026
Contributor
shigoel
left a comment
There was a problem hiding this comment.
Left a question. Not blocking.
aqjune-aws
approved these changes
Mar 25, 2026
joscoh
approved these changes
Mar 25, 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.
Accept an Array of Python statements instead of a Command/Program wrapper so callers control how modules are unwrapped. This removes the hidden assumption that translation always starts from a single Module command and makes the API more composable for upcoming pipeline changes.
pythonToLaurel'andpythonToLaurelnow takeArray (stmt SourceRange)instead ofPython.Command SourceRange, eliminating the internalmatchonModuleand the dead| _ => throwbranch.pythonToCorenow takesArray (stmt SourceRange)instead ofStrata.Program; thetoPyCommandsandunwrapModulehelpers are removed fromPythonToCore.lean.signaturesToLaurelmodulePrefixparameter is now required (no default) so callers explicitly choose the right prefix rather than silently getting"".StrataMain,PySpecPipeline,IdentifyOverloadsTest) where the module structure context is clear.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.