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. Re: help me with eroor (Lorenzo Bolla) ---------------------------------------------------------------------- Message: 1 Date: Sat, 15 Oct 2011 10:15:31 +0100 From: Lorenzo Bolla <lbo...@gmail.com> Subject: Re: [Haskell-beginners] help me with eroor To: kolli kolli <nammukoll...@gmail.com> Cc: beginners@haskell.org Message-ID: <cadjgtrx2t2hn9zky_-ewfkurhdnvxcttbyfxpwg86s+q_6b...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" You need a main function, like: main = do x <- getContents putStrLn $ parseCSV x (This would read a string from stdin and pass it to parseCSV; then it would print the result to stdout.) L. On Fri, Oct 14, 2011 at 8:59 PM, kolli kolli <nammukoll...@gmail.com> wrote: > import Text.ParserCombinators.Parsec > > csvFile = endBy line eol > line = sepBy cell (char ',') > cell = many (noneOf ",\n") > eol = char '\n' > > parseCSV :: String -> Either ParseError [[String]] > parseCSV input = parse csvFile "(unknown)" input > > *showing error: > <interactive>:1:32: Not in scope: `main' > * > > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://www.haskell.org/mailman/listinfo/beginners > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20111015/cc307371/attachment-0001.htm> ------------------------------ _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners End of Beginners Digest, Vol 40, Issue 21 *****************************************