[erlang-questions] Valid Erlang module?
Sun Apr 8 01:21:00 CEST 2018
On Sat, Apr 07, 2018 at 03:40:13PM -0700, Rohinton Kazak (rkazak) wrote:
> Just curious to know if this is a valid Erlang module.
> > cat mirror.erl
> mirror(Anything) -> Anything.
Compiles and runs OK for me on (I think) Erlang 19.2.1. What
version of erlang and what platform are you using?
Also, are you sure that (a) you're actually compiling the file you
think you are, and (b) there's no spurious control characters,
invisible text, or unexpected unicode in the source file?
For (a), try introducing a known error into the source (like "Foo@"
after the "-module()." directive) and see if the compiler picks up on
that. If it doesn't, you're not compiling the file you thought you
I'm not really expecting (b) to be an issue, but it's worth
mentioning. (I've seen people with compile failures in other languages
due to copy-pasting curly quotes from someone else's over-formatted
> As when I try and compile it I get
> 1> c(mirror).
> mirror.erl: internal error in lint_module;
> crash reason: undef
> in function sets:to_list/1
> called as sets:to_list()
> in call from erl_lint:check_unused_records/2 (erl_lint.erl, line 1211)
> in call from erl_lint:post_traversal_check/2 (erl_lint.erl, line 901)
> in call from erl_lint:module/3 (erl_lint.erl, line 534)
> in call from compile:lint_module/2 (compile.erl, line 1111)
> in call from compile:'-internal_comp/5-anonymous-1-'/3 (compile.erl, line 342)
> in call from compile:fold_comp/4 (compile.erl, line 369)
> in call from compile:internal_comp/5 (compile.erl, line 353)
> Thanks in advance!
> erlang-questions mailing list
Hugo Mills | We believe in free will because we have no choice.
hugo@REDACTED carfax.org.uk |
PGP: E2AB1DE4 |
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: Digital signature
More information about the erlang-questions