File tree Expand file tree Collapse file tree
rescript-ecosystem/ppx-proven-record Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,12 +29,12 @@ jobs:
2929 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3030
3131 - name : Initialize CodeQL
32- uses : github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v3.28.1
32+ uses : github/codeql-action/init@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v3.28.1
3333 with :
3434 languages : ${{ matrix.language }}
3535 build-mode : ${{ matrix.build-mode }}
3636
3737 - name : Perform CodeQL Analysis
38- uses : github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v3.28.1
38+ uses : github/codeql-action/analyze@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v3.28.1
3939 with :
4040 category : " /language:${{ matrix.language }}"
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ jobs:
130130
131131 - name : Comment on PR with findings
132132 if : github.event_name == 'pull_request' && steps.scan.outputs.findings_count > 0
133- uses : actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
133+ uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
134134 with :
135135 script : |
136136 const fs = require('fs');
Original file line number Diff line number Diff line change 3030 publish_results : true
3131
3232 - name : Upload SARIF
33- uses : github/codeql-action/upload-sarif@0d579ffd059c29b07949a3cce3983f0780820c98 # v4
33+ uses : github/codeql-action/upload-sarif@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4
3434 with :
3535 sarif_file : results.sarif
3636
Original file line number Diff line number Diff line change 2727 results_format : sarif
2828
2929 - name : Upload results
30- uses : github/codeql-action/upload-sarif@0d579ffd059c29b07949a3cce3983f0780820c98 # v3.31.8
30+ uses : github/codeql-action/upload-sarif@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v3.31.8
3131 with :
3232 sarif_file : results.sarif
Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: PMPL-1.0-or-later
2+ = ppx-proven-record
3+ Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
5+ ReScript PPX for verified record subset destructuring.
6+
7+ == Usage
8+
9+ [source,rescript]
10+ ----
11+ @rest let { className, ?children, ...otherProps } = props
12+ ----
13+
14+ Expands at compile time to explicit field extraction with a typed remainder.
15+
16+ == How It Works
17+
18+ The PPX implements the `computeComplement` algorithm from `proven/SafeRecord`,
19+ which is formally verified in Idris2 to produce exhaustive, disjoint partitions.
20+ The PPX is a direct transliteration — it does not call Idris2 at runtime, but
21+ implements the same algorithm the proofs guarantee correct.
22+
23+ == Formal Foundation
24+
25+ * Idris2 proofs: `proven/src/Proven/SafeRecord/`
26+ * Paper: `proven/docs/papers/safe-record-destructuring.adoc`
27+ * Ephapax linear spec: `nextgen-languages/ephapax/` (future)
28+
29+ == Build
30+
31+ [source,bash]
32+ ----
33+ # The PPX is an OCaml binary (ReScript PPX convention)
34+ dune build
35+ ----
36+
37+ == Status
38+
39+ Scaffolded. Implementation pending.
Original file line number Diff line number Diff line change 1+ (* SPDX-License-Identifier: PMPL-1.0-or-later *)
2+ (* Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk> *)
3+ (*
4+ * ppx_proven_record — ReScript PPX for verified record subset destructuring.
5+ *
6+ * Transforms:
7+ * @rest let { className, ?children, ...otherProps } = props
8+ *
9+ * Into:
10+ * let className = props.className
11+ * let children = props.children
12+ * let otherProps = { onClick: props.onClick, style: props.style, ... }
13+ *
14+ * The algorithm is a direct transliteration of computeComplement from
15+ * proven/src/Proven/SafeRecord/Proofs.idr, which is formally verified
16+ * to produce exhaustive, disjoint partitions.
17+ *
18+ * Status: Scaffold — implementation pending.
19+ *)
20+
21+ (* TODO: Implement the PPX transformation using ppxlib *)
22+ (* Key steps:
23+ * 1. Find @rest attributes on let bindings
24+ * 2. Extract the requested field names from the pattern
25+ * 3. Look up the record type from the type environment
26+ * 4. Compute the complement (remaining fields)
27+ * 5. Generate explicit destructuring code
28+ *)
You can’t perform that action at this time.
0 commit comments