<div dir="ltr">Afternoon Daniil, <div><br></div><div>I'm not sure what your getting at, the module that the atom that State#state.db refers to must export the calling function. Take a look at this link [0] (Only the atomic names bit the second bit has been removed from erlang) for more information about the basics of what is going on. The State is a variable and evaluated like one that's why it is in (). </div>
<div><br></div><div>maybe an easier way of coding it would be.</div><div>-record(state, {db=mneisa_module});</div><div><br></div><div>M = State#state.db</div><div>M:get_content(Tbl, Id)</div><div><br></div><div>-module(mneisa_module)</div>
<div>-export([get_content/2]).</div><div><br></div><div>-spec(...)</div><div>get_content(Tbl, Id) -> ....</div><div><br></div><div>[0] <a href="http://userprimary.net/posts/2009/03/04/two-erlang-finds-atomic-names-and-parameterized-modules/">http://userprimary.net/posts/2009/03/04/two-erlang-finds-atomic-names-and-parameterized-modules/</a></div>
<div><br></div><div>Regards</div><div><br></div><div>Chris</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 9 August 2013 12:56, Daniil Churikov <span dir="ltr"><<a href="mailto:ddosia@gmail.com" target="_blank">ddosia@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">Does anybody know could <b>dialyzer</b> break through such dynamic module construction, like <b>Chris Cook</b> wrote? Is it able to know that <b>State#state.db</b> module do not export <b>get_content/2</b> function, or it's contract is wrong?<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></div>