[erlang-questions] Dialyzer bugs help

Anthony Ramine n.oxyde@REDACTED
Thu Jan 2 22:19:39 CET 2014


Hello again Sean, hello Kostis,

There is something in Dialyzer that makes it say weird stuff about unused unexported functions.

-module(t).

-compile({nowarn_unused_function,[p_assert/1]}).

-ifdef(EXPORT).
-export([p_assert/1]).
-endif.

p_assert(P) ->
    fun(Input,Index) ->
        case P(Input,Index) of
            {fail,_} = Failure -> Failure;
            _ -> {[], Input, Index}
        end
    end.

If compiled with -DEXPORT, Dialyzer stays silent; if compiled without, Dialyzer yells.

Interestingly enough, it also unexpectedly yells if compiled with +export_all.

Regards,

-- 
Anthony Ramine

Le 2 janv. 2014 à 22:09, Anthony Ramine <n.oxyde@REDACTED> a écrit :

> Still fighting these two.




More information about the erlang-questions mailing list