Take a look at the following function: readCSVFile :: :: (MonadResource m, CSV ByteString a) => CSVSettings -> FilePath -> m [a]
, CSVSettings, defCSVSettings a FilePath (aka String), "file.csv" - .
, (MonadResource m, CSV ByteString a). , . IO , MonadResource m, m ResourceT IO, MonadBaseControl IO, runResourceT. conduit .
CSV ByteString a , CSV. http://hackage.haskell.org/packages/archive/csv-conduit/0.2.1.1/doc/html/Data-CSV -Conduit.html # t: CSV ( typeclass...) "", , CSV ByteString a. : CSV ByteString ByteString CSV ByteString Text.
Text , unicode, CSV . ByteString a [Word8], Text [Char], , , . , a Text ( ByteString ).
, ResourceT IO [Row Text]. , ResourceT , "" runResourceT. ,
readFile :: FilePath -> IO [Row Text]
readFile = runResourceT . readCSVFile defCSVSettings
, , , [Row Text], map fold, .
GHCI . , ; , CSVSettings FilePath, readCSVFile , m MonadResource m a CSV ByteString a, , GHCi, .