[Haskell-beginners] Empty 'do' constructor

Magnus Therning magnus at therning.org
Sat Sep 25 05:02:09 EDT 2010

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.


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.bin

More information about the Beginners mailing list