Hi,
It depends on what you mean by "doesn't parse". From your message is assume the CSV is valid, but some of the actual values fails to convert (using FromField). There are a couple of things you could try:
1. Define a newtype for your field that calls runParser using e.g. the Int parser and if it fails, return some other value. I should probably add an Either instance that covers this case, but there's none there now.
newtype MaybeInt = JustI !Int | ParseFailed
instance FromField MaybeInt where
parseField s = case runParser (parseField s) of
Left err -> pure ParseFailed
Right (n :: Int) -> JustI <$> n
(This is from memory, so I might have gotten some of the details wrong.)
2. Use the Streaming module, which lets you skip whole records that fails to parse (see the docs for the Cons constructor).
-- Johan