[erlang-questions] Valid Erlang module?

Gordon Guthrie gordon@REDACTED
Sun Apr 8 01:30:06 CEST 2018


I cut'n'paste a curly quote into the shell just yesterday :-)

On Sun, 8 Apr 2018, 00:21 Hugo Mills, <hugo@REDACTED> wrote:

> On Sat, Apr 07, 2018 at 03:40:13PM -0700, Rohinton Kazak (rkazak) wrote:
> > Hi,
> >
> > Just curious to know if this is a valid Erlang module.
> >
> > —8<
> > > cat mirror.erl
> > -module(mirror).
> >
> > -export([mirror/1]).
> >
> > 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
> were.
>
>    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
> website before...)
>
>    Hugo.
>
> > 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)
> > error
> >
> > Thanks in advance!
> >
>
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://erlang.org/mailman/listinfo/erlang-questions
>
>
> --
> Hugo Mills             | We believe in free will because we have no choice.
> hugo@REDACTED carfax.org.uk |
> http://carfax.org.uk/  |
> PGP: E2AB1DE4          |
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180407/ed7d297f/attachment.htm>


More information about the erlang-questions mailing list