Skip to content

Document resyntax/grimoire/syntax-path#787

Merged
jackfirth merged 12 commits into
masterfrom
grimoire-stxpath
Jul 3, 2026
Merged

Document resyntax/grimoire/syntax-path#787
jackfirth merged 12 commits into
masterfrom
grimoire-stxpath

Conversation

@jackfirth

@jackfirth jackfirth commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Documents the syntax-path? API in the grimoire, continuing from #785. Syntax paths are one of the foundational pieces of Resyntax that are used as part of its internal data model of how code moves around, so they're pretty important.

jackfirth and others added 2 commits July 2, 2026 10:50
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jackfirth jackfirth added the documentation Improvements or additions to documentation label Jul 2, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 10 files in this pull request and found no issues.

@coveralls

coveralls commented Jul 2, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 93.834% (+0.06%) from 93.772% — grimoire-stxpath into master

The empty syntax path is now called the root syntax path, matching
filesystem terminology, and nonempty paths are now called child paths,
since every path other than the root refers to a child of some
enclosing form.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 10 files in this pull request and found no issues.

jackfirth and others added 2 commits July 2, 2026 16:07
The previous wording implied flattening was specific to improper
lists. In fact all pair-based shapes are canonicalized the same way
regardless of how their pairs and syntax objects nest, as covered by
the "improper lists - all produce same paths" tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
"Flatten" evokes Racket's `flatten` function, which erases all tree
structure including nested proper lists. Syntax paths only normalize
improper lists into proper ones; nested forms remain distinct children.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 10 files in this pull request and found no issues.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 10 files in this pull request and found no issues.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 10 files in this pull request and found no issues.

- Fix the broken syntax property tech reference and a typo
- Fix the hash example: #hash keys are implicitly quoted, so ('b . 3)
  made the key the list (quote b) rather than the symbol b
- Give the discussion its own linkable subsection and point it and the
  comment preservation section in the rules docs at each other
- Document that source-read-syntax and source-expand attach the
  'original-syntax-path property, and index that property key with
  indexed-racket so it shows up in docs search

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 10 files in this pull request and found no issues.

jackfirth added 2 commits July 2, 2026 20:15
Most of the prose here looks good but there are some sneaky details I decided to call out.
The `@racket[]` form performs some syntax object normalization of its own, so these four syntax objects weren't all rendering as distinct text in the final document. Using `@tt{}` instead of `@racket[]` fixes this (because `@tt` doesn't try to actually parse its input text in any way).

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 10 files in this pull request and found no issues.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 10 files in this pull request and found no issues.

jackfirth and others added 3 commits July 2, 2026 20:43
The path is now validated with syntax-contains-path? before the
empty-splice early return, so removing zero children at a nonexistent
path raises a contract error instead of silently returning the syntax
unchanged. This makes the grimoire's documented claim true.

syntax-apply-delta now skips the removal step for pure insertions,
since their start paths may point one past the end of the enclosing
form, which is a valid insertion point but not a removable child.

Also restores a closing brace that went missing from the in-syntax-paths
documentation entry and broke the docs build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 10 files in this pull request and found no issues.

@jackfirth jackfirth marked this pull request as ready for review July 3, 2026 04:16
@jackfirth jackfirth merged commit 7869d7c into master Jul 3, 2026
8 checks passed
@jackfirth jackfirth deleted the grimoire-stxpath branch July 3, 2026 04:20

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 10 files in this pull request and found no issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants