leostera / caramel

:candy: a functional language for building type-safe, scalable, and maintainable applications
https://caramel.run
Apache License 2.0
1.06k stars 25 forks source link

v0.1 - OCaml libraries to manipulate Erlang #7

Closed leostera closed 4 years ago

leostera commented 4 years ago

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

Expression Language

Operators

leostera commented 4 years ago

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