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. E-mail (Angela Sheard)
2. Re: E-mail (Marc Weber)
3. Empty 'do' constructor (Sok H. Chang)
4. Re: Empty 'do' constructor (Brent Yorgey)
5. Re: Empty 'do' constructor (Sok H. Chang)
6. Re: Empty 'do' constructor (Magnus Therning)
----------------------------------------------------------------------
Message: 1
Date: Fri, 24 Sep 2010 21:18:20 +0000
From: Angela Sheard <[email protected]>
Subject: [Haskell-beginners] E-mail
To: [email protected]
Message-ID:
<[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
I'd like to post to the mailing list. My e-mail is:
[email protected]
Thanks! :D
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.haskell.org/pipermail/beginners/attachments/20100924/eac0061d/attachment-0001.html
------------------------------
Message: 2
Date: Fri, 24 Sep 2010 23:26:48 +0200
From: Marc Weber <[email protected]>
Subject: Re: [Haskell-beginners] E-mail
To: beginners <[email protected]>
Message-ID: <1285363589-sup-1...@nixos>
Content-Type: text/plain; charset=UTF-8
Hi Angela
Excerpts from Angela Sheard's message of Fri Sep 24 23:18:20 +0200 2010:
> I'd like to post to the mailing list. My e-mail is:
> [email protected]
> Thanks! :D
It looks like you suceeded :)
Marc Weber
------------------------------
Message: 3
Date: Sat, 25 Sep 2010 13:43:33 +0900
From: "Sok H. Chang" <[email protected]>
Subject: [Haskell-beginners] Empty 'do' constructor
To: [email protected]
Message-ID:
<[email protected]>
Content-Type: text/plain; charset="utf-8"
I use Haskell Platform 2010.2.0.0 on WinXP, and jEdit.
I write my first code, and got error...
main = do cs <- readFile "C:\\SPR.txt"
putStrLn $ myManupulation cs
myManupulation cs = (unlines cs) ! 3
The error message is "Empty 'do' construct"
What's this mean? and how can I fix it?
Thank you a lot!
--
Sok Ha, CHANG
Open Mind Clinic/Academy, 1551-1, Sa-Dong, SangRok-Gu, AnSan-City,
KyongGi-Do
Tel: 031-407-6114
HP: openmind.ac / www.openmind.ac
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.haskell.org/pipermail/beginners/attachments/20100924/28903758/attachment-0001.html
------------------------------
Message: 4
Date: Sat, 25 Sep 2010 00:49:14 -0400
From: Brent Yorgey <[email protected]>
Subject: Re: [Haskell-beginners] Empty 'do' constructor
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
On Sat, Sep 25, 2010 at 01:43:33PM +0900, Sok H. Chang wrote:
> I use Haskell Platform 2010.2.0.0 on WinXP, and jEdit.
> I write my first code, and got error...
>
> main = do cs <- readFile "C:\\SPR.txt"
> putStrLn $ myManupulation cs
>
> myManupulation cs = (unlines cs) ! 3
Because putStrLn is not indented it is not considered part of the
do-block. You should line it up under the stuff after the 'do',
like this:
main = do cs <- readFile "C:\\SPR.txt"
putStrLn $ myManupulation cs
-Brent
------------------------------
Message: 5
Date: Sat, 25 Sep 2010 16:21:37 +0900
From: "Sok H. Chang" <[email protected]>
Subject: Re: [Haskell-beginners] Empty 'do' constructor
To: Brent Yorgey <[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID: <5583714331640428...@unknownmsgid>
Content-Type: text/plain; charset=UTF-8
Thank you to your answer!
I indent me code as you said.
I tried using Tab, using spacesâ¦
But can't work.
Is there another possibility?
Thank you!
- Chang.
2010. 9. 25. ì¤í 1:49 Brent Yorgey <[email protected]> ìì±:
> On Sat, Sep 25, 2010 at 01:43:33PM +0900, Sok H. Chang wrote:
>> I use Haskell Platform 2010.2.0.0 on WinXP, and jEdit.
>> I write my first code, and got error...
>>
>> main = do cs <- readFile "C:\\SPR.txt"
>> putStrLn $ myManupulation cs
>>
>> myManupulation cs = (unlines cs) ! 3
>
> Because putStrLn is not indented it is not considered part of the
> do-block. You should line it up under the stuff after the 'do',
> like this:
>
> main = do cs <- readFile "C:\\SPR.txt"
> putStrLn $ myManupulation cs
>
> -Brent
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
------------------------------
Message: 6
Date: Sat, 25 Sep 2010 10:02:09 +0100
From: Magnus Therning <[email protected]>
Subject: Re: [Haskell-beginners] Empty 'do' constructor
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
On 25/09/10 08:21, Sok H. Chang wrote:
> Thank you to your answer!
> I indent me code as you said.
> I tried using Tab, using spacesâ¦
> But can't work.
>
> Is there another possibility?
> Thank you!
With the code looking like this:
main = do cs <- readFile "C:\\SPR.txt"
putStrLn $ myManupulation cs
myManupulation cs = (unlines cs) ! 3
Then it's indented properly, but it still doesn't compile because its types
don't line up properly.
/M
--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnusï¼ therningï¼org Jabber: magnusï¼ therningï¼org
http://therning.org/magnus identi.ca|twitter: magthe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url :
http://www.haskell.org/pipermail/beginners/attachments/20100925/2d27ae09/signature-0001.bin
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 27, Issue 53
*****************************************