Re: [Haskell-cafe] parsing a CSV file

2013-05-21 Thread Roger Mason
Thank you. Roger On 05/21/2013 03:15 PM, Roman Cheplyaka wrote: So this is the real error. If you read it carefully, it says that it expected [[String]] but got Char (i.e. [[[String]]]) as a result of the headerLines parser. I don't have time right now to look closer at your code, but

Re: [Haskell-cafe] parsing a CSV file

2013-05-21 Thread Roman Cheplyaka
* Roger Mason [2013-05-21 13:33:47-0230] > Hi Roman, > > On 05/21/2013 12:36 PM, Roman Cheplyaka wrote: > > > >Clearly, my naiive implementation of endHeader is no good. > >Hi Roger, > > > >"Not in scope" means that that thing is not defined. > > > >So it's not a problem with your implementation,

Re: [Haskell-cafe] parsing a CSV file

2013-05-21 Thread Roger Mason
Hi Roman, On 05/21/2013 12:36 PM, Roman Cheplyaka wrote: Clearly, my naiive implementation of endHeader is no good. Hi Roger, "Not in scope" means that that thing is not defined. So it's not a problem with your implementation, but with the way you load it. If you copy-paste your ghci session

Re: [Haskell-cafe] parsing a CSV file

2013-05-21 Thread Roman Cheplyaka
* Roger Mason [2013-05-21 12:22:53-0230] > Thus far, I have: > -- derived from RWH > -- file: ch16/csv2.hs > import Text.ParserCombinators.Parsec > > headerLines = endBy csvFile endHeader > csvFile = endBy line eol > line = sepBy cell (char ',') > cell = many (noneOf ",\n") > eol = char '\n' > >