Closed michallepicki closed 3 years ago
http://caml.inria.fr/pub/docs/manual-ocaml/patterns.html#sss:pat-alias
It should translate to Alias = pat in Erlang.
Alias = pat
https://github.com/AbstractMachinesLab/caramel/blob/d5128fce81b08a8007729f4c60f03297a8aa4b20/caramel/compiler/ocaml_to_erlang/fun.ml#L101
Example:
let with_alias ([ x ] as l) = if x then l else []
should translate to
-spec with_alias(list(boolean())) -> list(boolean()). with_alias([X | []] = L) -> case X of true -> L; false -> [] end.
http://caml.inria.fr/pub/docs/manual-ocaml/patterns.html#sss:pat-alias
It should translate to
Alias = pat
in Erlang.https://github.com/AbstractMachinesLab/caramel/blob/d5128fce81b08a8007729f4c60f03297a8aa4b20/caramel/compiler/ocaml_to_erlang/fun.ml#L101
Example:
should translate to