15 Oct
2011
15 Oct
'11
5:15 p.m.
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 <nammukolli04@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