Skip to content
/ terl Public

Typed Erlang Experiment - use Hindley-Milner type inference from Ocaml for type-checking

License

Notifications You must be signed in to change notification settings

mattiasw2/terl

Repository files navigation

terl

Typed Erlang Experiment - using Ocaml for type-checking

Dialyzer is nice, but I want to try a more standard Hindley-Milner type inference approach. http://okmij.org/ftp/ML/generalization.html

It has been tried before:

In order to do that, I need to restrict Erlang, for example the bang operator ! needs to know the module(s) it sends the message to.

Instead of implementing type-checking myself, version 1 will transform Erlang to an Ocaml program, and let the ocaml compiler to the verification. Erlang atoms will be mapped to Ocaml polymorphic variants, https://realworldocaml.org/v1/en/html/variants.html#polymorphic-variants

The initial goal is not to generate runnable Ocaml code, just enough to do the type-checking.

The ocaml type-checker is complex: http://okmij.org/ftp/ML/generalization.html

About

Typed Erlang Experiment - use Hindley-Milner type inference from Ocaml for type-checking

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published