Caramel currently supports generating Erlang source files from an OCaml typed-tree, and it aims to support type-checking a subset of Erlang using the OCaml type-checker as well.
To do this, we need to have good support of the Standard Erlang language at 3 levels: parsing, AST, and printing.
Parsing for reading the Erlang source files. AST for manipulating the structures (and converting from and to the OCaml ASTs). Printing to generate somewhat idiomatic, human readable .erl sources.
The result is a library for working with Erlang sources that is agnostic of the purposes of Caramel itself, and can be used to experiment with the language, build AST-aware transformations, a pretty printer, etc.
While I don't have an intention of doing all of those right now, I'd like to enable the OCaml and BEAM ecosystem to be able to do these things.
Postponing support for list comprehensions and records for now. We've got everything we need to support OCaml on the BEAM atm, and a little more. We'll do more work on this for v0.2 as described in #24
Summary
Caramel currently supports generating Erlang source files from an OCaml typed-tree, and it aims to support type-checking a subset of Erlang using the OCaml type-checker as well.
To do this, we need to have good support of the Standard Erlang language at 3 levels: parsing, AST, and printing.
Parsing for reading the Erlang source files. AST for manipulating the structures (and converting from and to the OCaml ASTs). Printing to generate somewhat idiomatic, human readable
.erl
sources.The result is a library for working with Erlang sources that is agnostic of the purposes of Caramel itself, and can be used to experiment with the language, build AST-aware transformations, a pretty printer, etc.
While I don't have an intention of doing all of those right now, I'd like to enable the OCaml and BEAM ecosystem to be able to do these things.
Checklist
The library should contain:
Language Support
This list and its completeness is a work in progress.
Preprocessor Language
Module Language
Type Language
Pattern Language
_
) -- AST, PrinterExpression Language
F()
) -- AST, Printerf()
) -- AST, Printerm:f()
) -- AST, PrinterM:F()
) -- AST, Printer[ H | T]
) -- AST, Printererlang:send/2
) -- AST, PrinterOperators