Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/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:  about installation of Haskell (Isaac Dupree)
   2.  Re: Defining 'words' in terms of 'span' (Heinrich Apfelmus)
   3. Re:  Re: Defining 'words' in terms of 'span' (Roger Whittaker)
   4.  Strange error during compilation/linking (Erik Quaeghebeur)
   5.  Re: Strange error during compilation/linking (Maciej Piechotka)
   6.  Getting into a Haskell project? (Duncan Mortimer)
   7. Re:  Getting into a Haskell project? (Marc Weber)
   8. Re:  Getting into a Haskell project? (Brent Yorgey)
   9. Re:  Getting into a Haskell project? (Brent Yorgey)
  10.  [Announcement] Fedora 12 rpms for leksah 0.8.0.1 now
      available (Lakshmi Narasimhan)


----------------------------------------------------------------------

Message: 1
Date: Wed, 17 Mar 2010 00:02:23 -0400
From: Isaac Dupree <[email protected]>
Subject: Re: [Haskell-beginners] about installation of Haskell
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed

On 03/16/10 23:39, Daniel Fischer wrote:
> Am Mittwoch 17 März 2010 03:03:30 schrieb love_pku:
>> Dear Sir or Madam::
>>
>>    Sorry to trouble you!
>>
>>    I am a beginner of Haskell and I just run into problems to install it.
>> So I hope if you can tell me which version of Haskell should I   use for
>> Ubuntu 8.04 operating system..
>
> I'm not familiar with Ubuntu, but
>
> apt-get install libghc6*
>
> or something like that should get you started (perhaps apt-search haskell
> first - or was it apt-get search?).
> Once you have GHC installed, you can start.

Use aptitude, not apt-* ... aptitude search ghc? (the compiler itself is 
ghc6, and the version in Hardy 8.04 is 6.8.2, which is sadly a bit old. 
Do you want to wait a month until Ubuntu Lucid 10.04 comes out, and 
upgrade?)

> I think. (If it's 6.8.*, maybe you want to get a newer GHC from
> http://haskell.org/ghc/download.html)

If you do, er.. You might want to install it in your home-directory 
somewhere, and put it in your PATH, and uninstall any GHC you installed 
via Ubuntu, and... basically it's rather a nuisance, though not as bad 
as a few years ago.  You may be able to get by just fine with Ubuntu 
8.04's packages, for your learning process.

-Isaac


------------------------------

Message: 2
Date: Wed, 17 Mar 2010 10:10:27 +0100
From: Heinrich Apfelmus <[email protected]>
Subject: [Haskell-beginners] Re: Defining 'words' in terms of 'span'
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

Roger Whittaker wrote:
> Thanks for the suggestions - I think the idea was that you had to
> use a recursive definition in terms of span.
> 
> I eventually did this, but didn't feel it was at all nice or
> elegant:
> 
> import Data.Char
> 
> mywords :: [Char] -> [[Char]]
> 
> mywords l |  ((snd (span isAlpha l)) == "" && (fst (span isAlpha l)) == "") = 
> []
>           |  ((snd (span isAlpha l)) == "" && (fst (span isAlpha l)) /= "") = 
> [fst (span isAlpha l)]
>           |  (fst (span isAlpha l))  == "" =  mywords (tail (snd (span 
> isAlpha l)))
>           |  otherwise = [fst (span isAlpha l)] ++ mywords (tail (snd (span 
> isAlpha l)))

You can perform a few simple steps to improve this definition. First of
all, introduce a variable for the the common  span isAlpha  part and use
pattern matching instead of  fst  and  snd .

    mywords xs
        |  r == "" && l == "" = []
        |  r == "" && l /= "" = [l]
        |  l == "" =  mywords (tail r)
        |  otherwise = [l] ++ mywords (tail r)
        where
        (l,r) = span isAlpha xs

There, much better already.

Then, you can group the four different cases, noting that they are
actually independent of each other: the result is always a concatenation
of either  []  or  [l]  with either  []  or  mywords (tail r)

    mywords xs = y ++ ys
        where
        (l,r) = span isAlpha xs
        y     = if l == "" then [] else [l]
        ys    = if r == "" then [] else mywords (tail r)



Regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com



------------------------------

Message: 3
Date: Wed, 17 Mar 2010 18:03:47 +0000
From: Roger Whittaker <[email protected]>
Subject: Re: [Haskell-beginners] Re: Defining 'words' in terms of
        'span'
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

On Wed, Mar 17, 2010 at 10:10:27AM +0100, Heinrich Apfelmus wrote:

> Then, you can group the four different cases, noting that they are
> actually independent of each other: the result is always a concatenation
> of either  []  or  [l]  with either  []  or  mywords (tail r)
> 
>     mywords xs = y ++ ys
>         where
>         (l,r) = span isAlpha xs
>         y     = if l == "" then [] else [l]
>         ys    = if r == "" then [] else mywords (tail r)

That's a great help - thank you.


-- 
========================
Roger Whittaker
[email protected]
http://disruptive.org.uk
========================


------------------------------

Message: 4
Date: Wed, 17 Mar 2010 20:27:47 -0400 (EDT)
From: Erik Quaeghebeur <[email protected]>
Subject: [Haskell-beginners] Strange error during compilation/linking
To: [email protected]
Message-ID: <alpine.deb.2.00.1003172027100.2...@flfbcjrt>
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII

Hi,


I get the following error while compiling (I guess it's actually the 
linking step):

$ghc -o cmimc cmimc.hs
cmimc.o: In function `rP1_info':
(.text+0x32a): undefined reference to
`containerszm0zi2zi0zi1_DataziMap_zdf2_closure'
cmimc.o: In function `rP3_info':
(.text+0x396): undefined reference to
`containerszm0zi2zi0zi1_DataziMap_zdf2_closure'
cmimc.o: In function `rPh_info':
(.text+0x666): undefined reference to
`containerszm0zi2zi0zi1_DataziMap_fromList_closure'
cmimc.o: In function `rPj_info':
(.text+0x6ca): undefined reference to
`containerszm0zi2zi0zi1_DataziMap_fromList_closure'
cmimc.o: In function `sR5_info':
(.text+0x1225): undefined reference to
`__stginit_containerszm0zi2zi0zi1_DataziMap_'
cmimc.o: In function `rP1_srt':
(.data+0x90): undefined reference to
`containerszm0zi2zi0zi1_DataziMap_zdf2_closure'
cmimc.o: In function `rP3_srt':
(.data+0xac): undefined reference to
`containerszm0zi2zi0zi1_DataziMap_zdf2_closure'
cmimc.o: In function `rPh_srt':
(.data+0x15c): undefined reference to
`containerszm0zi2zi0zi1_DataziMap_fromList_closure'
cmimc.o: In function `rPj_srt':
(.data+0x174): undefined reference to
`containerszm0zi2zi0zi1_DataziMap_fromList_closure'
collect2: ld returned 1 exit status

However, running the program with ghci:
$ghci cmimc.hs
Prelude Main> :set args "testinput.txt"
Prelude Main> :trace main

gives the correct output...

Where might there be a problem? In my installation (Kubuntu i386,
ghc6.10.4-1ubunbtu2) perhaps?

Please tell me if/which additional info I need to provide.


TIA,

Erik



------------------------------

Message: 5
Date: Thu, 18 Mar 2010 00:35:02 +0000
From: Maciej Piechotka <[email protected]>
Subject: [Haskell-beginners] Re: Strange error during
        compilation/linking
To: [email protected]
Message-ID: <1268872501.11851.1.ca...@picard>
Content-Type: text/plain; charset="utf-8"

On Wed, 2010-03-17 at 20:27 -0400, Erik Quaeghebeur wrote:
> Hi,
> 
> 
> I get the following error while compiling (I guess it's actually the 
> linking step):
> 
> $ghc -o cmimc cmimc.hs

ghc -o cmimc cmime.hs --make

or

ghc -o cmimc cmime.hs --package package-you-use

> cmimc.o: In function `rP1_info':
> (.text+0x32a): undefined reference to
> `containerszm0zi2zi0zi1_DataziMap_zdf2_closure'
> cmimc.o: In function `rP3_info':
> (.text+0x396): undefined reference to
> `containerszm0zi2zi0zi1_DataziMap_zdf2_closure'
> cmimc.o: In function `rPh_info':
> (.text+0x666): undefined reference to
> `containerszm0zi2zi0zi1_DataziMap_fromList_closure'
> cmimc.o: In function `rPj_info':
> (.text+0x6ca): undefined reference to
> `containerszm0zi2zi0zi1_DataziMap_fromList_closure'
> cmimc.o: In function `sR5_info':
> (.text+0x1225): undefined reference to
> `__stginit_containerszm0zi2zi0zi1_DataziMap_'
> cmimc.o: In function `rP1_srt':
> (.data+0x90): undefined reference to
> `containerszm0zi2zi0zi1_DataziMap_zdf2_closure'
> cmimc.o: In function `rP3_srt':
> (.data+0xac): undefined reference to
> `containerszm0zi2zi0zi1_DataziMap_zdf2_closure'
> cmimc.o: In function `rPh_srt':
> (.data+0x15c): undefined reference to
> `containerszm0zi2zi0zi1_DataziMap_fromList_closure'
> cmimc.o: In function `rPj_srt':
> (.data+0x174): undefined reference to
> `containerszm0zi2zi0zi1_DataziMap_fromList_closure'
> collect2: ld returned 1 exit status
> 
> However, running the program with ghci:
> $ghci cmimc.hs
> Prelude Main> :set args "testinput.txt"
> Prelude Main> :trace main
> 
> gives the correct output...
> 
> Where might there be a problem? In my installation (Kubuntu i386,
> ghc6.10.4-1ubunbtu2) perhaps?
> 

No. ghci/runhaskell automatically loades additional libraries. ghc do
not.

> Please tell me if/which additional info I need to provide.
> 
> 
> TIA,
> 
> Erik
> 

Regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
Url : 
http://www.haskell.org/pipermail/beginners/attachments/20100317/03cafbbc/attachment-0001.bin

------------------------------

Message: 6
Date: Thu, 18 Mar 2010 11:58:46 +1000
From: Duncan Mortimer <[email protected]>
Subject: [Haskell-beginners] Getting into a Haskell project?
To: [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Hi All,

I'm very new to both Haskell, and open source development (well...
really, development of any kind...).  However, I'm really interested
in getting good at both.

I was wondering whether anyone has any suggestions about good open
source Haskell projects I could cut my teeth on, and any advice in
general in getting into this stuff more deeply?

Thanks!
Duncan


------------------------------

Message: 7
Date: Thu, 18 Mar 2010 03:16:32 +0100
From: Marc Weber <[email protected]>
Subject: Re: [Haskell-beginners] Getting into a Haskell project?
To: beginners <[email protected]>
Message-ID: <1268878453-sup-...@nixos>
Content-Type: text/plain; charset=UTF-8

Hi Duncan,

> I was wondering whether anyone has any suggestions about good open
> source Haskell projects I could cut my teeth on, and any advice in
> general in getting into this stuff more deeply?

How strong are your teeth? (I mean how much time are you willing to
spend on this?)

Marc Weber


------------------------------

Message: 8
Date: Thu, 18 Mar 2010 02:02:12 -0400
From: Brent Yorgey <[email protected]>
Subject: Re: [Haskell-beginners] Getting into a Haskell project?
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

On Thu, Mar 18, 2010 at 11:58:46AM +1000, Duncan Mortimer wrote:
> Hi All,
> 
> I'm very new to both Haskell, and open source development (well...
> really, development of any kind...).  However, I'm really interested
> in getting good at both.
> 
> I was wondering whether anyone has any suggestions about good open
> source Haskell projects I could cut my teeth on, and any advice in
> general in getting into this stuff more deeply?
> 

Hi Duncan,

Here's my advice.  These should generally be done in parallel, not
necessarily in order:

  1. Work your way through a tutorial (or several) such as Learn You a
     Haskell [1] or Real World Haskell [2].

  2. Hang out in the #haskell IRC channel on freenode.net, hang out on
     this list.  Ask questions.  Read discussions other people are
     having, even sometimes about things you don't yet understand.

  3. Hack on your own little projects -- even if they're silly and
     probably won't actually turn into anything useful -- just to get
     some experience.

  4. For ideas of open-source Haskell projects you can help with, you
     can check out the Haskell Community and Activities Report (HCAR)
     [3], or ask around, like you've done here, but --

  5. Be patient.  I remember when I was first learning Haskell, I too
     sent a message to the mailing list asking if there were projects
     I could help with -- and I didn't get much of a response.  Not
     because there weren't things I could help with, but just because
     that's not usually the way things happen.  But I've now worked on
     lots of projects, some other people's and some of my own.  It
     just takes time to feel things out, find things you're interested
     in, figure out the culture, and so on.

-Brent


------------------------------

Message: 9
Date: Thu, 18 Mar 2010 02:04:37 -0400
From: Brent Yorgey <[email protected]>
Subject: Re: [Haskell-beginners] Getting into a Haskell project?
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

Whoops, forgot the links!

On Thu, Mar 18, 2010 at 02:02:12AM -0400, Brent Yorgey wrote:
>   1. Work your way through a tutorial (or several) such as Learn You a
>      Haskell [1] or Real World Haskell [2].
> 
>      can check out the Haskell Community and Activities Report (HCAR)
>      [3], or ask around, like you've done here, but --

[1] http://learnyouahaskell.com/
[2] http://book.realworldhaskell.org/
[3] http://www.haskell.org/communities/


------------------------------

Message: 10
Date: Thu, 18 Mar 2010 12:45:11 +0530
From: Lakshmi Narasimhan <[email protected]>
Subject: [Haskell-beginners] [Announcement] Fedora 12 rpms for leksah
        0.8.0.1 now available
To: [email protected], [email protected],
        [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="utf-8"

Leksah - 0.8.0.1 rpms for Fedora 12 now available

http://leksah.org/download.html

About Leksah:
*Leksah* is the Haskell IDE of choice. It is written in Haskell, uses Gtk,
and runs on Linux, Windows and Mac OS X. Leksah is a practical tool to
support the Haskell development process. It requires the Glasgow Haskell
Compiler (GHC).

*Installation Instructions
*
*Procedure for x86 platform*
Before proceeding to install the leksah rpms,
Uninstall leksah-0.6.1, ghc-binary-devel packages, incase you have installed
them from the leksah download page. Use the following command
        yum remove leksah ghc-binary-devel

Install these dependencies from the following location

http://leksah.org/packages/dependencies-0.8.0.1.fc12.i386.tar.gz

Extract the rpms from the tar.gz file. Select the rpms, right click and
click Install. To install from command line, change into
the extracted directory, become superuser and type in this command for x86

yum --nogpgcheck install ghc-binary-devel-0.5.0.2-1.fc12.i386.rpm
ghc-deepseq-devel-1.1.0.0-1.fc12.i386.rpm ghc-ltk-devel-0.8-1.fc12.i386.rpm
ghc-binary-shared-devel-0.8-1.fc12.i386.rpm
ghc-hslogger-devel-1.0.10-1.fc12.i386.rpm
haddock-leksah-2.5.0-1.fc12.i386.rpm

Download the leksah rpms from this location

http://leksah.org/packages/leksah-0.8.0.1-1.fc12.i386.rpm
http://leksah.org/packages/leksah-server-0.8.0.1-1.fc12.i386.rpm

Use the same procedure used for installing the dependencies.
*
Procedure for x86_64 platform*
Before proceeding to install the leksah rpms, please install these
dependencies from the following location

http://leksah.org/packages/dependencies-0.8.0.1.fc12.x86_64.tar.gz

Extract the rpms from the tar.gz file. Select the rpms, right click and
click Install. To install from command line, change into
the extracted directory, become superuser and type in this command

yum --nogpgcheck install ghc-binary-devel-0.5.0.2-1.fc12.x86_64.rpm
ghc-hslogger-devel-1.0.10-1.fc12.x86_64.rpm
ghc-binary-shared-devel-0.8-1.fc12.x86_64.rpm
ghc-ltk-devel-0.8-1.fc12.x86_64.rpm
ghc-deepseq-devel-1.1.0.0-1.fc12.x86_64.rpm
haddock-leksah-2.5.0-1.fc12.x86_64.rpm

Download leksah rpms from this location

http://leksah.org/packages/leksah-0.8.0.1-1.fc12.x86_64.rpm
http://leksah.org/packages/leksah-server-0.8.0.1-1.fc12.x86_64.rpm

Use the same procedure used for installing the dependencies

*Running leksah
*Once installation is completed, leksah menu item appears under
Applications->Programming (in GNOME).
-- 
Regards
Lakshmi Narasimhan T V
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.haskell.org/pipermail/beginners/attachments/20100318/eb7dd5e5/attachment.html

------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 21, Issue 19
*****************************************

Reply via email to