Skip to content

Test GADTs and other OCaml-derived type and module features - #9076

Open
cknitt wants to merge 1 commit into
masterfrom
ocaml-feature-tests
Open

cknitt wants to merge 1 commit into
masterfrom
ocaml-feature-tests

Conversation

@cknitt

@cknitt cknitt commented Oct 27, 2026

Copy link
Copy Markdown
Member

Part of #9074.

Behavioural tests for OCaml-derived features that had little or no coverage:

  • gadt_test: a typed evaluator, type witnesses with refined matches, an equality witness, existentials (record, tuple and first-class module payloads), a typed printf, GADTs with @as, @tag and @unboxed, and polymorphic recursion.
  • advanced_types_test: polymorphic record fields, explicit polymorphic annotations, constraint, as 'a, #...t patterns, private types, variance, destructive substitution, with module, module type of, higher-order and generative functors, and typed first-class modules.
  • extensible_variant_test: inline records with @as, rebinding, indexed extensions, private extensible types, and generative local exceptions.
  • Two error-message fixtures: matching a GADT without a locally abstract type, and polymorphic recursion without an annotation.

Fixtures for the bugs found are added by the PRs that fix them.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kbf3gLMawVgtmiKy3TMBc3

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Changelog

No changelog entry.

Semantic Diff

1 commit · Full page

Test GADTs and other OCaml-derived type and module features

78f82ac · cknitt + Claude · Oct 27, 2026, 12:39 UTC

GADTs, existentials, polymorphic record fields, constraint, private and indexed extensible types, destructive substitution and typed first-class modules had no behavioural tests. Part of #9074.

@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.66%. Comparing base (beb423d) to head (78f82ac).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9076      +/-   ##
==========================================
+ Coverage   81.45%   81.66%   +0.20%     
==========================================
  Files         460      460              
  Lines       64645    64645              
==========================================
+ Hits        52657    52792     +135     
+ Misses      11988    11853     -135     

see 14 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new

pkg-pr-new Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@9076

@rescript/belt

npm i https://pkg.pr.new/@rescript/belt@9076

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@9076

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@9076

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@9076

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@9076

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@9076

commit: 78f82ac

@github-actions

Copy link
Copy Markdown

@cknitt cknitt added the changelog:skip No release notes needed label Oct 27, 2026
@cknitt
cknitt marked this pull request as ready for review October 27, 2026 14:20
@cknitt

cknitt commented Oct 27, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T14:21:58.043087Z 3b48492 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 3b48492446

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

GADTs, existentials, polymorphic record fields, constraint, private and
indexed extensible types, destructive substitution and typed first-class
modules had no behavioural tests. Part of #9074.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gLMawVgtmiKy3TMBc3
Signed-off-by: Christoph Knittel <ck@cca.io>
@cknitt
cknitt force-pushed the ocaml-feature-tests branch from 3b48492 to 78f82ac Compare October 28, 2026 08:10

This branch has not been deployed

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

Labels

changelog:skip No release notes needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant