<div dir="ltr">Hi,<div><br></div><div>A tuple is not a dict() in general and furthermore a dict is opaque in the sense you are not supposed to look at the internal structure. The reason for the former is that the tuple {3, 5} is a counterexample to being a dict. The reason for the latter is that if the dict module changes its internal representation in the future, your code may not work.</div>

<div><br></div><div>The best fix is to remove the guard expression. </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 31, 2013 at 8:33 AM, Solomon <span dir="ltr"><<a href="mailto:solomon.wzs@gmail.com" target="_blank">solomon.wzs@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I define a function like this:<br><br>f(T) when is_tuple(T)-><br>  ...<br>  dict:to_list(T),<br>  ...<br>

  Ret.<br><br>When I checked the code with dialyzer, it said, "The call dict:to_list(T::tuple()) does not have an opaque term of type dict() as 1st argument".<br>
<br>There were no function to determine whether a term was dict(). So how I should fix this problem?<br><br>Thanks.<br></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>J.
</div>