Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: Creating modules (Magnus Therning)
2. Re: Creating modules (Dananji Liyanage)
3. Re: Creating modules (Magnus Therning)
4. Re: Creating modules (Dananji Liyanage)
----------------------------------------------------------------------
Message: 1
Date: Fri, 8 May 2015 12:43:38 +0200
From: Magnus Therning <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Creating modules
Message-ID:
<caaexw5usygbx_9htbmc4jxnve6leuoepbz4wp-omxkvdohy...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
On 8 May 2015 at 11:00, Dananji Liyanage <[email protected]> wrote:
> Hi All,
>
> I'm following this lecture[1] series and stuck at the module creation
> section.
>
> Even though I understand the idea of the module I can't figure out the exact
> syntax to module creation.
>
> Do we have to compile the Haskell file containing the module declaration?
>
> For an example:
>
> Do I have to compile this;
>
> module metricCalc(.....) where ...
> in a file metricCalc.hs
(First off, I believe module names must start with an uppercase
letter, i.e. call it MetricCalc.)
It depends on what you mean more exactly.
You can use `ghci` to load the source file directly:
~~~
Prelude> :l MetricCalc.hs
*MetricCalc>
~~~
If you use Cabal you can compile it and place it in a library which
you subsequently can install, so that you can use it from other
projects you work on.
/M
--
Magnus Therning OpenPGP: 0xAB4DFBA4
email: [email protected] jabber: [email protected]
twitter: magthe http://therning.org/magnus
------------------------------
Message: 2
Date: Fri, 8 May 2015 16:23:47 +0530
From: Dananji Liyanage <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Creating modules
Message-ID:
<caapsy8yx4f9wwe8fixmbrjwbnsaj7dx0nhexuk9vofptnkg...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
?Thanks Magnus!!
Got it to working.
On Fri, May 8, 2015 at 4:13 PM, Magnus Therning <[email protected]> wrote:
> On 8 May 2015 at 11:00, Dananji Liyanage <[email protected]> wrote:
> > Hi All,
> >
> > I'm following this lecture[1] series and stuck at the module creation
> > section.
> >
> > Even though I understand the idea of the module I can't figure out the
> exact
> > syntax to module creation.
> >
> > Do we have to compile the Haskell file containing the module
> declaration?
> >
> > For an example:
> >
> > Do I have to compile this;
> >
> > module metricCalc(.....) where ...
> > in a file metricCalc.hs
>
> (First off, I believe module names must start with an uppercase
> letter, i.e. call it MetricCalc.)
>
> It depends on what you mean more exactly.
>
> You can use `ghci` to load the source file directly:
>
> ~~~
> Prelude> :l MetricCalc.hs
> *MetricCalc>
> ~~~
>
> If you use Cabal you can compile it and place it in a library which
> you subsequently can install, so that you can use it from other
> projects you work on.
>
> /M
>
> --
> Magnus Therning OpenPGP: 0xAB4DFBA4
> email: [email protected] jabber: [email protected]
> twitter: magthe http://therning.org/magnus
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
--
Regards,
Dananji Liyanage
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.haskell.org/pipermail/beginners/attachments/20150508/c2c38006/attachment-0001.html>
------------------------------
Message: 3
Date: Fri, 8 May 2015 13:01:07 +0200
From: Magnus Therning <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Creating modules
Message-ID:
<caaexw5to6aofaeypakadvuxjvcgnjcctofdhysbdx8ugh4_...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
On 8 May 2015 at 12:53, Dananji Liyanage <[email protected]> wrote:
> Thanks Magnus!!
>
> Got it to working.
Excellent! I can recommend reading the ghc docs[1], they are good and
very readable. Then peruse Hackage to find examples of how things
work.
/M
[1]: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/index.html
--
Magnus Therning OpenPGP: 0xAB4DFBA4
email: [email protected] jabber: [email protected]
twitter: magthe http://therning.org/magnus
------------------------------
Message: 4
Date: Fri, 8 May 2015 16:35:06 +0530
From: Dananji Liyanage <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Creating modules
Message-ID:
<CAAPsY8yrX2ErcvG+3gjbeKO08mQF8A6r5cEOvVE1dw6Ni1SN=g...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Thank you very much :)
On Fri, May 8, 2015 at 4:31 PM, Magnus Therning <[email protected]> wrote:
> On 8 May 2015 at 12:53, Dananji Liyanage <[email protected]> wrote:
> > Thanks Magnus!!
> >
> > Got it to working.
>
> Excellent! I can recommend reading the ghc docs[1], they are good and
> very readable. Then peruse Hackage to find examples of how things
> work.
>
> /M
>
> [1]:
> https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/index.html
>
> --
> Magnus Therning OpenPGP: 0xAB4DFBA4
> email: [email protected] jabber: [email protected]
> twitter: magthe http://therning.org/magnus
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
--
Regards,
Dananji Liyanage
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.haskell.org/pipermail/beginners/attachments/20150508/b03b2049/attachment-0001.html>
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 83, Issue 10
*****************************************