ocaml: phase 1+3 record type declarations (+3 tests, 447 total)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 26s

type r = { x : int; mutable y : string } parses to
(:type-def-record NAME PARAMS FIELDS) with FIELDS each (NAME) or
(:mutable NAME). Parser dispatches on { after = to parse field list.
Field-type sources are skipped (HM registration TBD). Runtime no-op
since records already work as dynamic dicts.
This commit is contained in:
2026-05-08 18:26:34 +00:00
parent f070bddb0e
commit 66da0e5b84
4 changed files with 104 additions and 36 deletions

View File

@@ -403,6 +403,13 @@ _Newest first._
binary search tree (`type 'a tree = Leaf | Node of 'a * 'a tree *
'a tree`) with insert + in-order traversal. Tests parametric ADT,
recursive match, List.append, List.fold_left.
- 2026-05-08 Phase 1+3 — record type declarations `type r = { x : int;
mutable y : string }` (+3 tests, 447 total). Parser dispatches on
`{` after `=` to parse field list (`mutable` keyword tracked).
AST: `(:type-def-record NAME PARAMS FIELDS)` with FIELDS each being
`(NAME)` or `(:mutable NAME)`. Runtime is no-op (records already
work as dynamic dicts). Field-type sources are skipped; HM type
registration deferred.
- 2026-05-08 Phase 5.1 — fizzbuzz.ml baseline (12/12 pass). Classic
fizzbuzz using ref-cell accumulator, for-loop, mod, if/elseif chain,
String.concat, Int.to_string. Verifies output via String.length.