-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Parse CSV formatted data efficiently -- -- Parse CSV formatted data efficiently @package bytestring-csv @version 0.1 module Text.CSV.ByteString.Lex -- | Efficiently lex CSV data from a bytestring lexCSV :: ByteString -> [CSVToken] data CSVToken Comma :: CSVToken Newline :: CSVToken Item :: !!ByteString -> CSVToken instance Eq CSVToken instance Show CSVToken module Text.CSV.ByteString -- | A CSV file is a series of records. According to the RFC, the records -- all have to have the same length. As an extension, I allow variable -- length records. type CSV = [Record] -- | A record is a series of fields Each record is located on a separate -- line, delimited by a line break (CRLF). type Record = [Field] -- | A field is a strict ByteString. Within the header and each record, -- there may be one or more ields, separated by commas. Each line should -- contain the same number of fields throughout the file. Spaces are -- considered part of a field and should not be ignored. The last field -- in the record must not be followed by a comma. type Field = ByteString -- | Parse a ByteString into a CSV form. parseCSV :: ByteString -> Maybe CSV