<div dir="ltr">It would me more logical if you had three modules, Parser, EMail, Main, where Main imports the other two, and they are independent.</div><div class="gmail_extra"><br><div class="gmail_quote">On 7 June 2015 at 00:13, Mike Houghton <span dir="ltr"><<a href="mailto:mike_k_houghton@yahoo.co.uk" target="_blank">mike_k_houghton@yahoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I’ve haskell files parser.hs and email.hs<br>
email.hs is a module imported into parser and parser has the main.<br>
<br>
email has various passwords and server names needed to connect and send email. I want to have those details in a config file and read it in at start - using say config module. I’m ok with this part but the practicality of doing it eludes me...<br>
<br>
It seems to me that email module can either get the config details itself or be told them by parser. If email wants to get them how would it do this? It does not have a main that gets run so can’t load a config file.(can it ??)<br>
<br>
However parser can load the config in its main and then tell mail what the values are but how would mail save them?<br>
<br>
Of course I could chanage the signatures of the email send/receive functions in mail to take the connection details but that seems wrong.<br>
<br>
Thanks<br>
<br>
Mike<br>
<br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>Regards</div><div dir="ltr"><div><br></div><div>Sumit Sahrawat</div></div></div></div></div></div></div>
</div>