[erlang-questions] LFE - Lisp Flavoured Erlang released
Robert Virding
rvirding@REDACTED
Mon Mar 3 00:04:22 CET 2008
On 02/03/2008, Kostis Sagonas <kostis@REDACTED> wrote:
>
> Robert Virding wrote:
> >
> > Please report bugs and other mis-features and I will fix them as soon as
> > I can.
>
>
> Well, since you asked for it, at a click of a button dialyzer reports
> the following:
>
> lfe_scan.erl:215: The pattern <Rest, Line, {'end_token', T}, Ts> can
> never match the type <_,_,'error' | 'skip_token' | {'error',[32 | 97 |
> 99 | 101 | 103 | 104 | 105 | 108 | 114 | 116,...]},_>
> lfe_scan.erl:164: The pattern <Rest, Line, {'end_token', T}> can never
> match the type <_,_,'error' | 'skip_token' | {'error',[32 | 97 | 99 |
> 101 | 103 | 104 | 105 | 108 | 114 | 116,...]}>
> lfe_scan.erl:118: The pattern <Rest, Line, {'end_token', T}, Ts> can
> never match the type <_,_,'error' | 'skip_token' | {'error',[32 | 97 |
> 99 | 101 | 103 | 104 | 105 | 108 | 114 | 116,...]},[{atom(),_} |
> {'number',_,_} | {'string',_,[any()]} | {'symbol',_,atom()}]>
> lfe_scan.erl:255: The pattern <Rest, Line, {'end_token', _T}, Error> can
> never match the type <_,_,'error' | 'skip_token' | {'error',[32 | 97 |
> 99 | 101 | 103 | 104 | 105 | 108 | 114 | 116,...]},_>
>
> lfe_macro.erl:490: The pattern {'yes', _} can never match the type
> 'error' | {'ok',_}
> lfe_macro.erl:489: The pattern {'yes', _} can never match the type
> 'error' | {'ok',_}
>
>
> The first set is just dead clauses. The second set, is a mismatch of the
> return value of a function.
The first lot from lfe_scan are just handling a possible legal case which
can be used in leex but which I don't use here. You can return a token
{end_token,Token} which means that if you use the tokens/2/3 call then it
will read tokens up to and including an {end_token,...}. Perfect for Erlang
'. '.
The second one was a bug, now fixed, thank you.
Dialyzer also reports some more additional warnings which are also
> reported by the BEAM compiler, so I am suppressing these.
None of the compiler warnings are interesting so I ignore them.
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080303/2046d0d4/attachment.htm>
More information about the erlang-questions
mailing list