Send Beginners mailing list submissions to beginners@haskell.org 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 beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org 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 <angelashe...@gmail.com> Subject: [Haskell-beginners] E-mail To: beginners@haskell.org Message-ID: <aanlkti=qt_8gcw35k+vfyjn=tavse4_t-vm30rxx-...@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1" I'd like to post to the mailing list. My e-mail is: angelashe...@gmail.com 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 <marco-owe...@gmx.de> Subject: Re: [Haskell-beginners] E-mail To: beginners <beginners@haskell.org> 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: > angelashe...@gmail.com > Thanks! :D It looks like you suceeded :) Marc Weber ------------------------------ Message: 3 Date: Sat, 25 Sep 2010 13:43:33 +0900 From: "Sok H. Chang" <shae...@gmail.com> Subject: [Haskell-beginners] Empty 'do' constructor To: beginners@haskell.org Message-ID: <aanlktikbw1gz=jfnz-qudjqt9hprfba8camxbeikw...@mail.gmail.com> 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 <byor...@seas.upenn.edu> Subject: Re: [Haskell-beginners] Empty 'do' constructor To: beginners@haskell.org Message-ID: <20100925044913.ga17...@seas.upenn.edu> 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" <shae...@gmail.com> Subject: Re: [Haskell-beginners] Empty 'do' constructor To: Brent Yorgey <byor...@seas.upenn.edu> Cc: "beginners@haskell.org" <beginners@haskell.org> 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 <byor...@seas.upenn.edu> ìì±: > 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 > Beginners@haskell.org > http://www.haskell.org/mailman/listinfo/beginners ------------------------------ Message: 6 Date: Sat, 25 Sep 2010 10:02:09 +0100 From: Magnus Therning <mag...@therning.org> Subject: Re: [Haskell-beginners] Empty 'do' constructor To: beginners@haskell.org Message-ID: <4c9dba91.9010...@therning.org> 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 Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners End of Beginners Digest, Vol 27, Issue 53 *****************************************