feat(res-to-affine): #488 partial-port slice 3 — array + record literals (Refs #488)#496
Merged
Merged
Conversation
…als (Refs #488) Extends --partial expression coverage: - array literals: ReScript `[a, b]` -> AffineScript `[a, b]` (1:1). - record literals: ReScript `{x: x, y: y}` -> `Rec #{ x: x, y: y }`. AffineScript records are NOMINAL (`Type #{ .. }`), so an anonymous ReScript record gets the placeholder type `Rec` for the human to rename; field punning `{x}` expands to `x: x`; field values are translated. JS objects, interpolated template strings, try/catch etc. still become `() /* TODO */` holes. Verified locally: full dune build exit 0; 32 res-to-affine walker tests green (2 new); `main.exe check` on the skeletons parses (resolution/type errors only, no parse error). Refs #488 https://claude.ai/code/session_017T8SzHr2yXav8hm4Ho76Uw
🔍 Hypatia Security ScanFindings: 83 issues detected
View findings[
{
"reason": "Action perpolymath/standards/.github/workflows/governance-reusable.yml@main\n needs attention",
"type": "unpinned_action",
"file": "governance.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action ons/checkout@v6\n needs attention",
"type": "unpinned_action",
"file": "publish-jsr.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action land/setup-deno@v2\n needs attention",
"type": "unpinned_action",
"file": "publish-jsr.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in affine-vscode-publish.yml",
"type": "missing_timeout_minutes",
"file": "affine-vscode-publish.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "missing_timeout_minutes",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "missing_timeout_minutes",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "missing_timeout_minutes",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "missing_timeout_minutes",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "missing_timeout_minutes",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "missing_timeout_minutes",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
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.
What
Slice 3 of #488 partial-port mode — extends
--partialexpression coverage with array and record literals:--partial)let pair = x => [x, x]fn pair(x: _) -> _ { [x, x] }let mkpt = (x, y) => {x: x, y: y}fn mkpt(x: _, y: _) -> _ { Rec #{ x: x, y: y } }let pun = x => {x, y: 2}fn pun(x: _) -> _ { Rec #{ x: x, y: 2 } }[a, b]→[a, b]).Type #{ … }— no anonymous form), so an anonymous ReScript record gets the placeholder typeRecfor the human to rename; field punning{x}expands tox: x; field values are translated.JS objects, interpolated template strings,
try/catch, etc. still become() /* TODO */holes.Verification (local, apt-bootstrapped toolchain)
dune builddune runtest tools/res-to-affine/990214amain.exe checkon the skeletonRemaining under #488
JS objects / template strings, labelled-arg refinement, combining
--partialwith--translate(declarations + functions in one pass), and module-qualified-reference resolution (a module-mapping policy decision).Refs #488https://claude.ai/code/session_017T8SzHr2yXav8hm4Ho76Uw
Generated by Claude Code