Better types

This commit is contained in:
Luca Molteni 2018-06-08 21:45:20 +02:00
parent edd130781c
commit f922df71d2

View File

@ -187,7 +187,7 @@ parseCsv2 = undefined
parseCassava :: FilePath -> String -> Either String [Record]
parseCassava path content = fmap fromCassavaToCSV $ DCSV.decode DCSV.NoHeader (C.pack content)
fromCassavaToCSV :: (V.Vector (V.Vector C.ByteString)) -> [Record]
fromCassavaToCSV :: (V.Vector (V.Vector C.ByteString)) -> CSV
fromCassavaToCSV records = V.toList (V.map toCSVRecord records)
where toCSVRecord fields = V.toList (V.map (C.unpack) fields)
>>>>>>> Conversion to Text CSV type