Page
Library
Module
Module type
Parameter
Class
Class type
Source
The erlang
library is now completely free of references to Caramel and should be usable on its own without problems.
The caramel/stdlib
has now been refactored to include the necessary Erlang runtime to not depend anymore on special cases in the Erlang AST printer.
Some tests have been updated accordingly.
The gen_tcp
example module has been split into an ffi and type definitions to leverage the fact that empty modules (full of ffi's) do not generate any Erlang code. This way getting the example up and running is more straightforward.
erldump
binary that can be used to dump the parsed ast. This is currently being used for the tests.gen_tcp
example.caramel.abstractmachines.dev
compiler: preliminary support for guards is added in this release. They are "safe" as long as you don't redefine any of the expected functions. There is no good way at the moment to prevent this from happening, but we could achieve it by essentially forbidding the use of the module name Erlang
and requiring all guards to be fully qualified names.
This still leaves us with the issue of compounded guard expressions.
At the end of the day, we want a function is_valid_guard : expression -> bool
that can traverse an arbitrary expression and tell us if it is or is not a valid guard based on the specification found at the Erlang docs.
caramelc: the parse
subcommand now can take a --lang
and --tree
parameters to print out the parse and typed trees for OCaml, as well as the parse tree of Erlang, and the parse tree of the result of compiling OCaml to Erlang.
This is particularly useful for testing and understanding the AST translation, and will likely be used later on to see if the compile -> typecheck -> compile cycle yields the same inputs, and thus is an isomorphism.
{ my_record with field = value }
My_record#{ field := value }
let f () =
let g () = 1 in
g ()
f() ->
G = fun () -> 1 end,
G().
X = X + 1
on the Erlang side.x' = x + 1
and it will translate to X_prime = X + 1
.Better releases
caramelc compile
now supports multiple --target
flags, so you can compile both archives and Erlang sources at once.Process.spawn/1
has been renamed to Process.make/1
until we have support for module attributes (see #21)The idea for this pre-release is to start testing out how the Stdlib feels to write some small programs and scan 1) whether some obvious FFIs are missing, and 2) how straightforward it is to write new ones.
The internal modules for the compiler and the typing experiments are split now, and the Erlang support is unified in a single library that only depends on the standard library and the Sexplib library for deriving Sexp representations.
The goals here are:
establish clearer compilation and type checking paths:
dist: use valid gcc host triples in release names
First release shipping with a tiny Stdlib!
Now you don't really need OCaml installed for Caramel to be able to compile some ML and typecheck some Erlang
New release naming and a new linux+musl binary
caramelc check
--target
flag is now available, and supports core
, erl
and native
targets--dump-ast
flag is now documented and hooked up to core erlang backendFirst release with caramelc
binaries.
First release.