Send Beginners mailing list submissions to beginners@haskell.org 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 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. Re: Parsing a file (Roger Mason) 2. Re: Parsing a file (Roger Mason) ---------------------------------------------------------------------- Message: 1 Date: Thu, 27 Jan 2022 08:51:01 -0330 From: Roger Mason <rma...@mun.ca> To: beginners@haskell.org Subject: Re: [Haskell-beginners] Parsing a file Message-ID: <y65o83xnz76....@mun.ca> Content-Type: text/plain Hello Francesco, Thanks for your help. Francesco Ariis <fa...@ariis.it> writes: > > Simple quiz: do you understand why > > main :: IO () > main = "prova" > That returns a String rather than an "IO something". > does nor work (nor compile) while > > main :: IO () > main = putStrLn "prova" > > does? putStrLn returns an "IO something" and so is campatible with the type of main. Thank you for the help & encouragement. Roger ------------------------------ Message: 2 Date: Thu, 27 Jan 2022 08:55:02 -0330 From: Roger Mason <rma...@mun.ca> To: beginners@haskell.org Subject: Re: [Haskell-beginners] Parsing a file Message-ID: <y65k0elnz4u....@mun.ca> Content-Type: text/plain Hello David, David McBride <toa...@gmail.com> writes: > These two pieces of code are not equivalent. > > :{ > input = do > eqatoms <- readFile "Parsing_File/eqatoms.out" > return eqatoms > :} > > :{ > main = do > eqatoms <- readFile "Parsing_File/eqatoms.out" > Parsec.parse species "test species" eqatoms > return > :} Thank you for the help. Now I understand better the error that I made. Roger ------------------------------ Subject: Digest Footer _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners ------------------------------ End of Beginners Digest, Vol 162, Issue 2 *****************************************