Skip to content

Convert DDM files to Lean 4 modules and fix mkScopedIdent for module support#431

Merged
joehendrix merged 3 commits intomainfrom
jhx/core_module
Feb 17, 2026
Merged

Convert DDM files to Lean 4 modules and fix mkScopedIdent for module support#431
joehendrix merged 3 commits intomainfrom
jhx/core_module

Conversation

@joehendrix
Copy link
Contributor

@joehendrix joehendrix commented Feb 16, 2026

Summary

Enable #strata_gen to work correctly in Lean 4 module files and convert all DDM test files to modules.

Details

  • Fix mkScopedIdent in #strata_gen so generated types resolve correctly in module files
  • Convert Strata.Languages.Core.DDMTransform.Parse and all 23 StrataTest/DDM/ test files to modules
  • Add public import re-exports to Strata.DDM.Integration.Lean so downstream files need minimal explicit imports
  • Remove unused atArg helper from OfAstM and unused Strata.DDM.Util.Lean
  • Update #guard_msgs expected output in test files for private name mangling in module context
  • Minor simplifications to Gen.lean: use getCategoryOpIdent helper, clarify variable names and comments

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@joehendrix joehendrix marked this pull request as ready for review February 16, 2026 21:06
@joehendrix joehendrix requested a review from a team as a code owner February 16, 2026 21:06
@joehendrix joehendrix enabled auto-merge February 16, 2026 21:11
joehendrix and others added 3 commits February 17, 2026 10:17
…module support

Parse.lean is now a Lean 4 module with public imports and a public section
for #strata_gen. The mkScopedIdent function in Gen.lean is updated to handle
module files by using mkPrivateName for the pre-resolution hint when not in
a public section. Removed duplicate scopedIdent/currScopedIdent/arrayLit
definitions from Util/Lean.lean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Convert all 23 StrataTest/DDM test files to modules, exercising the
mkScopedIdent fix across DDM test scenarios. Add public re-exports to
Strata.DDM.Integration.Lean so test files need minimal explicit imports.
Remove unused atArg from OfAstM. Update #guard_msgs expected output for
private name mangling in module context.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…t comments

- Rename `hint` to `preresolution` in mkScopedIdent for clarity
- Replace direct mkScopedIdent calls with getCategoryOpIdent in
  toAstIdentM, ofAstIdentM, and createNameIndexMap
- Add comments explaining public import vs public meta import distinction
- Shorten import comments to stay within 80-char soft limit

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@joehendrix joehendrix added this pull request to the merge queue Feb 17, 2026
Merged via the queue into main with commit 313c30f Feb 17, 2026
15 checks passed
@joehendrix joehendrix deleted the jhx/core_module branch February 17, 2026 19:24
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.

3 participants