Document the remaining undocumented data types#425
Conversation
There was a problem hiding this comment.
Pull request overview
This PR closes remaining gaps in the OpenVox 8 language reference for data types by (1) adding documentation for previously undocumented abstract/unusual types, (2) correcting/expanding Boolean parameterization docs, and (3) updating the data type index to include missing entries.
Changes:
- Expand
lang_data_abstract.mdwith new sections forScalarData,RichData,Iterable/Iterator,Runtime,Object, andTypeSet, and correctScalar’s matched-type description. - Update
lang_data_type.mdto index newly documented and previously unindexed types (e.g.,Sensitive,NotUndef,Init,TypeSet, etc.). - Fix
lang_data_boolean.mdto documentBoolean[true]/Boolean[false]parameterization.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/_openvox_8x/lang_data_type.md | Adds missing index entries and link refs for newly documented and previously unindexed data types. |
| docs/_openvox_8x/lang_data_boolean.md | Corrects Boolean docs to include narrowing parameters and an enforcing example. |
| docs/_openvox_8x/lang_data_abstract.md | Adds documentation for additional abstract/unusual types and updates Scalar/RichData/ScalarData descriptions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
docs/_openvox_8x/lang_data_abstract.md:21
[typecasting]: ./lang_typecasting.htmlpoints to a page that doesn't exist in this PR, so it will be a broken internal link (and can fail link-check CI) unless #424 is merged first or this PR also includes the new page.
[time]: ./lang_data_time.html
[binary]: ./lang_data_binary.html
[error]: ./lang_data_error.html
[sensitive]: ./lang_data_sensitive.html
[typecasting]: ./lang_typecasting.html
d9eb48f to
e7b219c
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
docs/_openvox_8x/lang_data_abstract.md:443
- This link target (
[typecasting][]) points at./lang_typecasting.html, but that page is not present on this branch (sorake test:links/ internal link checks will fail if this PR is merged before #424). Consider linking to the generatednewfunction reference until the dedicated typecasting page exists, or otherwise ensure the referenced page is included before merge.
See [typecasting][] for the conversions `Init` tests against.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
docs/_openvox_8x/lang_data_abstract.md:21
lang_typecasting.htmlis referenced here, but that page isn't present in this PR (and currently doesn't exist in this branch), which will cause internal-link checks to fail when this change is merged on its own. Consider pointing this reference at an existing stable target (e.g. thenew()function reference) until the dedicated typecasting page is available.
[typecasting]: ./lang_typecasting.html
The language collection described several types only in passing, or not at all. Close the smaller gaps left over from the Puppet 5.5 import: * Add ScalarData, RichData, Iterable, and Iterator to the abstract data types page, each placed beside the types it belongs with. * Add Runtime, Object, and TypeSet under unusual types. TypeSet is the spelling OpenVox renders, though the parser accepts any capitalization, and a module publishes one from types/init_typeset.pp. * Index Sensitive under core data types, and NotUndef, Init, and the seven types above under abstract data types, in lang_data_type.md. All were either documented but unlisted, or absent entirely. * Document the Boolean[true] and Boolean[false] parameters. The page said Boolean "accepts no parameters", which is incorrect. Documenting the parent types turned up three errors in the existing text, corrected here: * Scalar was described as equivalent to Variant[Integer, Float, String, Boolean, Regexp]. In OpenVox 8 it also matches SemVer, SemVerRange, Timestamp, and Timespan, none of which that Variant matches. The equivalence claim is removed rather than restated, since a fixed Variant will drift again as the lattice grows. The SemVer page already contradicted it. * Data was described as matching any value that would match Scalar. It is built on ScalarData, so a regular expression matches Scalar but not Data. * Data's hashes were described as taking keys that match Scalar. Only string keys are accepted; integer, float, and boolean keys are rejected. RichData also omitted several types it matches while Data does not: URI, regular expressions, and resource and class references. Every example and type relationship is verified against OpenVox 8.28.1 with puppet apply. Part of OpenVoxProject#407 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Michael Harp <mike@mikeharp.com>
e7b219c to
34ff616
Compare
Closes out the smaller gaps in #407, the ones left over after the six missing data type pages.
Types that had no documentation anywhere
Added to
lang_data_abstract.md, each placed with the types it belongs beside rather than in a list at the end:ScalarDataandRichDatasit next toScalarandData, since the distinction between them is the JSON-compatible subset in both casesIterableandIteratorare kept adjacent so the subtype relationship between them is visibleRuntime,Object, andTypeSetgo under unusual types, alongsideCallableandInitTypeSetis the spelling OpenVox renders when it prints the type, though the parser accepts any capitalization. The page says so, since upstream docs render it "Typeset". It also namestypes/init_typeset.ppas where a module publishes one, rather than implying a type set is assembled automatically from thetypesdirectory.Index entries
lang_data_type.mdlisted neither the types above nor three that were already documented. AddedSensitiveto core data types, andNotUndef,Init, and the seven new types to abstract data types.Booleanparameterslang_data_boolean.mdsaidBoolean"accepts no parameters". That is incorrect:Boolean[true]andBoolean[false]narrow it to one of the two values. Replaced with a parameters section showing the matches and a class parameter that may only ever betrue.Corrections worth a closer look
Writing the parent type sections turned up three factual errors in the existing text. All three are corrected here, and all three were confirmed by running the cases rather than by reading.
1.
Scalarwas described as equivalent toVariant[Integer, Float, String, Boolean, Regexp]. It also matchesSemVer,SemVerRange,Timestamp, andTimespan:lang_data_semver.mdalready contradicted this. I removed the equivalence claim rather than restating it with a longerVariant, since the lattice has grown since the 5.5 import and a fixed list will drift again.2.
Datawas described as matching any value that would matchScalar. It is built onScalarData, so a regular expression matchesScalarbut notData:3.
Data's hashes were described as taking keys that matchScalar. Only string keys are accepted:Separately, the
RichDatalist omitted several types it matches whileDatadoes not:URI, regular expressions, and resource and class references. Found by sweeping every candidate type for membership in both rather than spot-checking.A note for review: Puppet's
<=on types is not purely extensional, so subtype comparisons alone are misleading here.Numeric <= Variant[Integer, Float]isfalsewhile the reverse istrue. Every conclusion above rests on value membership tests, not on<=.Verification
puppet apply, re-checked in the exact form it appears on the page.RichDataandDatamembership to confirm both lists are complete.Boolean[true]confirmed to actually enforce, not just match: a class parameter declaredBoolean[true]with afalsedefault is a compile error.types/init_typeset.ppclaim checked against the OpenVox loader source rather than assumed.markdownlint-cli2reports no issues on all three files.bundle exec jekyll buildis clean and all nine new anchors resolve in the built HTML.Content is original prose in the existing
lang_data_*house style.Part of #407