[erlang-bugs] core_lint:module/1 problem
Robert Virding
rvirding@REDACTED
Mon Jan 26 13:58:04 CET 2009
2009/1/26 Lars-Åke Fredlund <lfredlund@REDACTED>
> Version: otp R12B-5 (not patched)
> Problem:
> Applying core_lint:module/1 to a core erlang module generated by
> compile:file(FileSpec,[to_core,binary] (without problems)
> results in the error message:
> *** Core Erlang ERROR in module schedule: illegal guard expression in
> reschedule/1
>
> Source code and core erlang code for function attached.
> (apparently the checks for correct guards are too strict for try...
> guards).
>
> /Lars-Ake Fredlund
>
Without having looked at the actual code I can say that some of the core
support modules, core_lint and core_parse for example, don't always follow
the latest core development. This is because they are not actually used by
the compiler, it *knows* it's generated code is correct.
Another problem I had with LFE is that some of the core optimisation passes
assumed that the core module was generated in the same way as the from the
erlang compiler, in some cases they couldn't handle general core. This has
now been fixed.
Basically, both of these are due to core erlang not really being a language
in its own right but a pass in the compiler. Whether it should be like that
is another question.
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20090126/a7022aa6/attachment.htm>
More information about the erlang-bugs
mailing list