[Haskell-cafe] parsing a CSV file
Roger Mason
rmason at mun.ca
Tue May 21 18:03:47 CEST 2013
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 here, you may get further help.
>
> Roman
Starting with a clean ghci session I get this:
ghci> :l csv.hs
[1 of 1] Compiling Main ( csv.hs, interpreted )
csv.hs:15:24:
Couldn't match type `[Char]' with `Char'
Expected type: Text.Parsec.Prim.Parsec String () [[String]]
Actual type: Text.Parsec.Prim.ParsecT
String () Data.Functor.Identity.Identity [[[[Char]]]]
In the first argument of `parse', namely `headerLines'
In the expression: parse headerLines "(unknown)" input
In an equation for `parseHDR':
parseHDR input = parse headerLines "(unknown)" input
Failed, modules loaded: none.
Thanks,
Roger
This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php
More information about the Haskell-Cafe
mailing list