<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px"><div id="yui_3_16_0_1_1433617340807_3686">Global state is an option - thanks. Didn't think Haskell allowed this.</div><div id="yui_3_16_0_1_1433617340807_3686"><br></div><div id="yui_3_16_0_1_1433617340807_3686">Having three modules may be more logical but doesn't it just put the same problem into the new module?</div><div id="yui_3_16_0_1_1433617340807_3686"><br></div><div id="yui_3_16_0_1_1433617340807_3686">Thanks</div> <br><div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;"> <div dir="ltr"> <font size="2" face="Arial"> On Saturday, 6 June 2015, 19:43, Mike Houghton <mike_k_houghton@yahoo.co.uk> wrote:<br> </font> </div> <br><br> <div class="y_msg_container">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 ymailto="mailto:Beginners@haskell.org" 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><br><br></div> </div> </div> </div></div></body></html>