[erlang-questions] LFE syntax, was Leex - a lexical anaylzer generator, released

zambal zambal@REDACTED
Thu May 29 21:59:17 CEST 2008


On May 28, 1:14 am, "Robert Virding" <rvird...@REDACTED> wrote:
> ... At present macros are not exported, the only solution today is to put them
> in a separate file and include them with (include-file ...). You can also
> slurp them into the shell. This is pretty much like you do in Erlang today.
> It wouldn't be too difficult to define a way to export them and have the
> macro expander check for their existence at macro expand time. It is a
> possible new feature for the next release. You would have to be a bit sneaky
> as their is no real support for macros in Erlang, it would be difficult to
> integrate them as seamlessly as in Lisp.
>
> Robert

I thought at first that include-file didn't work yet, but it
apparently works if I omit the quote in the filename string.

Maybe you could make compiling/loading files more consistent in a next
LFE update, because the current situation seems to be like this:

(include-file "filename.ext")

(c '"module.erl") or (c 'module)

(slurp '"module.erl")


I currently tend to forget what convention to use when using one of
these functions :-)

Best,
Vincent




More information about the erlang-questions mailing list