Skip to content

hash_consing 0.2.1: structured comments PlDoc can read - #3

Closed
Atry wants to merge 3 commits into
mainfrom
release-0.2.1
Closed

Atry wants to merge 3 commits into
mainfrom
release-0.2.1

Conversation

@Atry

@Atry Atry commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

The pack server's page for prolog/hash_consing.pl showed no documentation on any predicate. Every %! comment carried its description on the mode line (%! intern(?Term, ?Id) Id is the Id of the ground term Term.), which PlDoc rejects with "failed to process structured comment".

Changes

  • Each mode line now stands alone; the description follows after a blank comment line, reflowed to 78 columns and capitalized.
  • The mode of occurrence_abstracted/8, which spanned two lines, is now one line.
  • test/hash_consing.plt gets the same layout.
  • The module comment's FIXME on the order of two Ids is deleted: it is stated behaviour, not a defect. Rule (2) for a file that opts in, which already forbids reading the order, now says that the standard order of two Ids depends on the history of insertions into the store, not on their terms.
  • The README gets a section "Share one directive among files": a warning that the rewrite is per file, so a file that receives interned terms without listing their constructor fails silently, and an example of one rewritten/1 directive kept in a file that every module include/1s. The module comment's opt-in paragraph says the same. Probed: two modules including one directive file hand an Id between them; a third that lists nothing fails silently on the same term.
  • version('0.2.1').

Comments and README only: the code is unchanged.

Checks

  • Loaded with doc_collect(true), the library raises no PlDoc warning, and doc_comment/4 gives a summary for each of the seven exports.
  • All 65 tests pass.

🤖 Generated with Claude Code

Atry added 3 commits October 1, 2026 02:07
Every %! comment carried its description on the mode line, which PlDoc
rejects, so the pack server showed no documentation on any predicate. Each
mode line now stands alone and the description follows it. Comments only;
the code is unchanged.
…IXME

The module comment's FIXME on the order of Ids is deleted; the rule for a
file that opts in now says that the standard order of two Ids depends on
the history of insertions into the store.
The README and the module comment warn that the rewrite is per file and
show one directive file included by every module that hands the terms to
another.
@Atry

Atry commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #4: everything since 0.2.0 ships in one release, 0.2.1.

@Atry Atry closed this Oct 1, 2026
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.

1 participant