Semantic Diff

#9146 Remove dead code: js_stdout, gentype Curry import, toplevel entry point and more

7 commits

7249c119e4b590a831809c68ac8546baa05ca6bf..pr-9146

e443be620 · cknitt + Claude · Oct 30, 2026, 20:18 UTC

Remove the js_stdout flag, which is always true

Js_config.js_stdout starts as ref true and nothing writes it, so the two && !js_stdout tests are always true.

b6e4b04b9 · cknitt + Claude · Oct 30, 2026, 20:29 UTC

Remove gentype's Curry import path

emit_import_curry is never set to true, so gentype never imports curry.js (which the runtime no longer has). The flag, the import path, platform_lib and Module_name.curry go with it.

0bfb53eae · cknitt + Claude · Oct 30, 2026, 20:31 UTC

Stop storing every printed type in an unused analysis cache

Shared.type_to_string read its cache only when cache_type_to_string was set, which nothing does, but stored every printed type in it, keyed by a type_expr that a hash collision would compare structurally.

1a956ea57 · cknitt + Claude · Oct 30, 2026, 20:32 UTC

Stop suggesting @uncurry and checking for Js.Fn arity types in analysis

The compiler no longer recognises @uncurry, and the Js.Fn.arityN types that is_uncurried_internal looked for are gone from the runtime, so hover and references never took those branches.

5e0e797c9 · cknitt + Claude · Oct 30, 2026, 20:33 UTC

Remove the OCaml toplevel phrase entry point from Typemod

type_toplevel_phrase, left over from the OCaml REPL, was the only caller passing ~toplevel:true, so the ?toplevel parameters of type_structure, type_open and Env.open_signature always took their default. The outcome printer test types its file with type_structure.

9500dacd4 · cknitt + Claude · Oct 30, 2026, 20:34 UTC

Delete commented-out OCaml code in the type checker and match compiler

Debug printers in parmatch.ml and switch.ml, newmarkedvar and check_expans in btype, and the Clflags.recursive_types remnants in typedecl and ctype were all commented out; print_pat still matched Tpat_lazy, which no longer exists.

5f1c99b68 · cknitt + Claude · Oct 30, 2026, 20:34 UTC

Remove the Otyp_attribute outcome tree node

Nothing constructs Otyp_attribute; only the outcome printer matched it. The commit also adds the changelog fragment for this dead-code cleanup.