<div dir="ltr">Thanks Anthony!<div><br></div><div>Kostis replied to me privately and we found what you did -- unused functions get none() type parameters because there's no type to infer. Not sure if this is a Dialyzer bug (the function had a spec!), or just a fact-of-life. This basically raised the fact I had been hacking around tracking which combinators were used/unused in the generated parser by injecting a -compile({nowarn_unused_function, [...]}) attribute into the generated code. Shame on me! I've rectified the issue for now using macros.</div>
<div><br></div><div>The other errors are more trivial.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 2, 2014 at 3:19 PM, Anthony Ramine <span dir="ltr"><<a href="mailto:n.oxyde@gmail.com" target="_blank">n.oxyde@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello again Sean, hello Kostis,<br>
<br>
There is something in Dialyzer that makes it say weird stuff about unused unexported functions.<br>
<br>
-module(t).<br>
<br>
-compile({nowarn_unused_function,[p_assert/1]}).<br>
<br>
-ifdef(EXPORT).<br>
-export([p_assert/1]).<br>
-endif.<br>
<div class="im"><br>
p_assert(P) -><br>
fun(Input,Index) -><br>
case P(Input,Index) of<br>
</div> {fail,_} = Failure -> Failure;<br>
<div class="im"> _ -> {[], Input, Index}<br>
end<br>
end.<br>
<br>
</div>If compiled with -DEXPORT, Dialyzer stays silent; if compiled without, Dialyzer yells.<br>
<br>
Interestingly enough, it also unexpectedly yells if compiled with +export_all.<br>
<br>
Regards,<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Anthony Ramine<br>
<br>
Le 2 janv. 2014 à 22:09, Anthony Ramine <<a href="mailto:n.oxyde@gmail.com">n.oxyde@gmail.com</a>> a écrit :<br>
<br>
> Still fighting these two.<br>
<br>
</font></span></blockquote></div><br></div>