We provide one possible answer in MLscript, an object-oriented and functional programming language with records, generic classes, mix-in traits, first

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-10-21 02:30:34

We provide one possible answer in MLscript, an object-oriented and functional programming language with records, generic classes, mix-in traits, first-class unions and intersections, instance matching, and ML-style principal type inference. These features can be used to implement expressive class hierarchies as well as extensible sums and products.

MLscript supports union, intersection, and complement (or negation) connectives, making sure they form a Boolean algebra, and add enough structure to derive a sound and complete type inference algorithm.

We recommend you to install JDK and sbt via coursier. The versions of Node.js that passed our tests are from v16.14 to v16.17, v17 and v18. Run npm install to install TypeScript. Note that ScalaJS cannot find the global installed TypeScript. We explicitly support TypeScript v4.7.4.

Individual tests can be run with -z. For example, ~mlscriptJVM/testOnly mlscript.DiffTests -- -z parser will watch for file changes and continuously run all parser tests (those that have "parser" in their name).

Leave a Comment