úÎ|zv3T      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS Safe-InferredBThe result of parsing a CSV input is a mixed collection of errors F and valid rows. This way of representing things is crucial to the @ ability to parse lazily whilst still catching format errors. 5A structured error type for CSV formatting mistakes.  A CSV field'<s content is stored with its logical row and column number, H as well as its textual extent. This information is necessary if you F want to generate good error messages in a secondary parsing stage, I should you choose to convert the textual fields to typed data values. (A CSV row is just a sequence of fields. BA CSV table is a sequence of rows. All rows have the same number  of fields. 0Extract just the valid portions of a CSV parse. *Extract just the errors from a CSV parse. BExtract the full table, including invalid rows, with padding, and  de-duplicated headers. ;The header row of the CSV table, assuming it is non-empty. <A first-stage parser for CSV (comma-separated values) data. F The individual fields remain as text, but errors in CSV formatting 8 are reported. Errors (containing unrecognisable rows/ fields) are # interspersed with the valid rows/fields. >Sometimes CSV is not comma-separated, but delimiter-separated G values (DSV). The choice of delimiter is arbitrary, but semi-colon H is common in locales where comma is used as a decimal point, and tab , is also common. The Boolean argument is J whether newlines should be accepted within quoted fields. The CSV RFC F says newlines can occur in quotes, but other DSV formats might say G otherwise. You can often get better error messages if newlines are  disallowed. IPretty-printing for CSV fields, shows positional information in addition  to the textual content. !GOutput a table back to a lazily-constructed string. There are lots of H possible design decisions one could take, e.g. to re-arrange columns I back into something resembling their original order, but here we just F take the given table without looking at Row and Field numbers etc. "HOutput a table back to a lazily-constructed bytestring, using the given H delimiter char. The Boolean argument is to repair fields containing / newlines, by replacing the nl with a space. #AConvert a CSV table to a simpler representation, by dropping all & the original location information. $BConvert a simple list of lists into a CSVTable by the addition of > logical locations. (Textual locations are not so useful.) > Rows of varying lengths generate errors. Fields that need 5 quotation marks are automatically marked as such. % Select and/>or re-arrange columns from a CSV table, based on names in the I header row of the table. The original header row is re-arranged too. I The result is either a list of column names that were not present, or ) the (possibly re-arranged) sub-table. &@Validate that the columns of a table have exactly the names and # ordering given in the argument. ':A join operator, adds the columns of two tables together. : Precondition: the tables have the same number of rows. (7A generator for a new CSV column, of arbitrary length. = The result can be joined to an existing table if desired. )7Generate a fresh field with the given textual content. < The quoting flag is set automatically based on the text. L Textual extents are not particularly useful, since there was no original  input to refer to. @TUVWXY Z[\]^_`abcdef !"ghi#$%&'()*  !"#$%&'()3    !"#$%&(')'TUVWXY   Z[\]^_`abcdef !"ghi#$%&'() Safe-Inferred*BThe result of parsing a CSV input is a mixed collection of errors F and valid rows. This way of representing things is crucial to the @ ability to parse lazily whilst still catching format errors. +5A structured error type for CSV formatting mistakes. 7 A CSV field'<s content is stored with its logical row and column number, H as well as its textual extent. This information is necessary if you F want to generate good error messages in a secondary parsing stage, I should you choose to convert the textual fields to typed data values. A(A CSV row is just a sequence of fields. BBA CSV table is a sequence of rows. All rows have the same number  of fields. C0Extract just the valid portions of a CSV parse. D*Extract just the errors from a CSV parse. EGExtract the full table, including invalid rows, repaired with padding. F;The header row of the CSV table, assuming it is non-empty. G<A first-stage parser for CSV (comma-separated values) data. F The individual fields remain as text, but errors in CSV formatting 8 are reported. Errors (containing unrecognisable rows/ fields) are # interspersed with the valid rows/fields. H>Sometimes CSV is not comma-separated, but delimiter-separated G values (DSV). The choice of delimiter is arbitrary, but semi-colon H is common in locales where comma is used as a decimal point, and tab , is also common. The Boolean argument is J whether newlines should be accepted within quoted fields. The CSV RFC F says newlines can occur in quotes, but other DSV formats might say G otherwise. You can often get better error messages if newlines are  disallowed. I0Some pretty-printing for structured CSV errors. JIPretty-printing for CSV fields, shows positional information in addition  to the textual content. K@Turn a full CSV table back into text, as much like the original - input as possible, e.g. preserving quoted/unquoted format of fields. L@Turn a full CSV table back into text, using the given delimiter  character. Quoted/2unquoted formatting of the original is preserved. D The Boolean argument is to repair fields containing newlines, by " replacing the nl with a space. MAConvert a CSV table to a simpler representation, by dropping all & the original location information. NBConvert a simple list of lists into a CSVTable by the addition of > logical locations. (Textual locations are not so useful.) > Rows of varying lengths generate errors. Fields that need 5 quotation marks are automatically marked as such. O Select and/>or re-arrange columns from a CSV table, based on names in the I header row of the table. The original header row is re-arranged too. I The result is either a list of column names that were not present, or ) the (possibly re-arranged) sub-table. PFValidate that the named columns of a table have exactly the names and # ordering given in the argument. Q:A join operator, adds the columns of two tables together. : Precondition: the tables have the same number of rows. R7A generator for a new CSV column, of arbitrary length. = The result can be joined to an existing table if desired. S7Generate a fresh field with the given textual content. < The quoting flag is set automatically based on the text. L Textual extents are not particularly useful, since there was no original  input to refer to. ;jklmno*+,-./0123456789:;<=>?@ABCDEFGHpqrstuvwIJKLxyzMNOPQRS**+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS3BA7:8;<=>?@;<=>9+20/-,3456345114.*DCEFGHIJKLMNOPRQS"jklmno*+20/-,3456345114.7 :8;<=>?@;<=>9ABCDEFGHpqrstuvwIJKLxyzMNOPQRS{      !"#$%&'()*+      !"#$%&'()*+,,-./0123456789:;<=>?@,,-./012345679>?@A lazy-csv-0.4Text.CSV.Lazy.ByteStringText.CSV.Lazy.String CSVResultCSVErrorNoDataDuplicateHeader csvDuplicate FieldError BlankLinecsvField IncorrectRowcsvRowcsvColsExpected csvColsActual csvFieldsCSVField CSVFieldError csvFieldError csvRowNum csvColNum csvTextStart csvTextEndcsvFieldContentcsvFieldQuotedCSVRowCSVTablecsvTable csvErrors csvTableFullcsvTableHeaderparseCSVparseDSV ppCSVError ppCSVField ppCSVTable ppDSVTable fromCSVTable toCSVTable selectFields expectFieldsjoinCSV mkEmptyColumn mkCSVFieldCSVStatetableRowtableColtextRowtextColvalidate extractErrscheckDuplicateHeaders incTableRow incTableCol incTextRow incTextColherelexCSV getFieldsdoStringFieldContentmkFieldmkErrorindentquoted replaceNL