<div dir="auto">I cut'n'paste a curly quote into the shell just yesterday :-) </div><br><div class="gmail_quote"><div dir="ltr">On Sun, 8 Apr 2018, 00:21 Hugo Mills, <<a href="mailto:hugo@carfax.org.uk">hugo@carfax.org.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, Apr 07, 2018 at 03:40:13PM -0700, Rohinton Kazak (rkazak) wrote:<br>
> Hi,<br>
><br>
> Just curious to know if this is a valid Erlang module.<br>
><br>
> —8<<br>
> > cat mirror.erl<br>
> -module(mirror).<br>
><br>
> -export([mirror/1]).<br>
><br>
> mirror(Anything) -> Anything.<br>
<br>
Compiles and runs OK for me on (I think) Erlang 19.2.1. What<br>
version of erlang and what platform are you using?<br>
<br>
Also, are you sure that (a) you're actually compiling the file you<br>
think you are, and (b) there's no spurious control characters,<br>
invisible text, or unexpected unicode in the source file?<br>
<br>
For (a), try introducing a known error into the source (like "Foo@"<br>
after the "-module()." directive) and see if the compiler picks up on<br>
that. If it doesn't, you're not compiling the file you thought you<br>
were.<br>
<br>
I'm not really expecting (b) to be an issue, but it's worth<br>
mentioning. (I've seen people with compile failures in other languages<br>
due to copy-pasting curly quotes from someone else's over-formatted<br>
website before...)<br>
<br>
Hugo.<br>
<br>
> As when I try and compile it I get<br>
><br>
> 1> c(mirror).<br>
> mirror.erl: internal error in lint_module;<br>
> crash reason: undef<br>
><br>
> in function sets:to_list/1<br>
> called as sets:to_list([])<br>
> in call from erl_lint:check_unused_records/2 (erl_lint.erl, line 1211)<br>
> in call from erl_lint:post_traversal_check/2 (erl_lint.erl, line 901)<br>
> in call from erl_lint:module/3 (erl_lint.erl, line 534)<br>
> in call from compile:lint_module/2 (compile.erl, line 1111)<br>
> in call from compile:'-internal_comp/5-anonymous-1-'/3 (compile.erl, line 342)<br>
> in call from compile:fold_comp/4 (compile.erl, line 369)<br>
> in call from compile:internal_comp/5 (compile.erl, line 353)<br>
> error<br>
><br>
> Thanks in advance!<br>
><br>
<br>
> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org" target="_blank" rel="noreferrer">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br>
<br>
--<br>
Hugo Mills | We believe in free will because we have no choice.<br>
hugo@... <a href="http://carfax.org.uk" rel="noreferrer noreferrer" target="_blank">carfax.org.uk</a> |<br>
<a href="http://carfax.org.uk/" rel="noreferrer noreferrer" target="_blank">http://carfax.org.uk/</a> |<br>
PGP: E2AB1DE4 |<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank" rel="noreferrer">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>