-- Represent externals structurally end-to-end: the declaration (name, module source, scopes, variadic, argument specs, return annotation) is the stored FFI representation, consumed directly by validation, signature inclusion, printing, and code generation. This removes the `Marshal`-encoded spec that rode in `pval_prim`'s second slot and every magic-byte sniff that recognized it; `Pccall` and the runtime `external_spec` shape are deleted (externals expand to their JS call form at translation, visible in `-drawlambda`); signature inclusion compares declarations, fixing two quirks where identical-after-alias-expansion declarations were rejected (object-external optional fields, and `unit` vs an alias of `unit` in result types — the latter also fixes external unit-return handling for alias result types); `%absfloat`, a latent compiler crash, is removed. The ast, cmi, and cmt magic numbers are bumped (`ResImpl01301`/`ResIntf01301`, `Caml1999I025`, `Caml1999T026`). https://github.com/rescript-lang/rescript/pull/8581
0 commit comments