ReScript introduces a strongly typed language that targets JavaScript, as an alternative to gradually typed languages, such as TypeScript. In this paper, we present a type system for data-flow analysis for a subset of the ReScript language, more specific for a lambda-calculus with mutability and pattern matching. The type system is a local analysis that collects information about what variables are used and alias information.
翻译:ReScript 作为一种强类型语言,其编译目标为 JavaScript,为逐步类型化语言(如 TypeScript)提供了一种替代方案。本文提出了一种针对 ReScript 语言子集的数据流分析类型系统,具体针对包含可变性与模式匹配的 λ 演算。该类型系统通过局部分析,收集变量使用信息及别名信息。