<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif;font-size:small">​Thanks Magnus!!</div><div class="gmail_default" style="font-family:georgia,serif;font-size:small"><br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:small">Got it to working.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 8, 2015 at 4:13 PM, Magnus Therning <span dir="ltr"><<a href="mailto:magnus@therning.org" target="_blank">magnus@therning.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 8 May 2015 at 11:00, Dananji Liyanage <<a href="mailto:dan9131@gmail.com">dan9131@gmail.com</a>> wrote:<br>
> Hi All,<br>
><br>
> I'm following this lecture[1] series and stuck at the module creation<br>
> section.<br>
><br>
> Even though I understand the idea of the module I can't figure out the exact<br>
> syntax to module creation.<br>
><br>
> Do we have to compile the  Haskell file containing the module declaration?<br>
><br>
> For an example:<br>
><br>
> Do I have to compile this;<br>
><br>
>                 module metricCalc(.....) where ...<br>
> in a file metricCalc.hs<br>
<br>
</span>(First off, I believe module names must start with an uppercase<br>
letter, i.e. call it MetricCalc.)<br>
<br>
It depends on what you mean more exactly.<br>
<br>
You can use `ghci` to load the source file directly:<br>
<br>
~~~<br>
Prelude> :l MetricCalc.hs<br>
*MetricCalc><br>
~~~<br>
<br>
If you use Cabal you can compile it and place it in a library which<br>
you subsequently can install, so that you can use it from other<br>
projects you work on.<br>
<span class="HOEnZb"><font color="#888888"><br>
/M<br>
<br>
--<br>
Magnus Therning                      OpenPGP: 0xAB4DFBA4<br>
email: <a href="mailto:magnus@therning.org">magnus@therning.org</a>   jabber: <a href="mailto:magnus@therning.org">magnus@therning.org</a><br>
twitter: magthe               <a href="http://therning.org/magnus" target="_blank">http://therning.org/magnus</a><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>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div><div><font face="georgia,serif">Regards, <br>Dananji Liyanage</font></div></div></div></div></div>
</div>