úÎ{ÂuaV      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTU Safe-InferredÇThe result of parsing a CSV input is a mixed collection of errors and valid rows. This way of representing things is crucial to the ability to parse lazily whilst still catching format errors.4A structured error type for CSV formatting mistakes.ÿA CSV field's content is stored with its logical row and column number, as well as its textual extent. This information is necessary if you want to generate good error messages in a secondary parsing stage, should you choose to convert the textual fields to typed data values.'A CSV row is just a sequence of fields.OA CSV table is a sequence of rows. All rows have the same number of fields./Extract just the valid portions of a CSV parse.)Extract just the errors from a CSV parse.[Extract 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. The individual fields remain as text, but errors in CSV formatting are reported. Errors (containing unrecognisable rows/fields) are interspersed with the valid rows/fields.ÿÞSometimes CSV is not comma-separated, but delimiter-separated values (DSV). The choice of delimiter is arbitrary, but semi-colon is common in locales where comma is used as a decimal point, and tab is also common. The Boolean argument is whether newlines should be accepted within quoted fields. The CSV RFC says newlines can occur in quotes, but other DSV formats might say otherwise. You can often get better error messages if newlines are disallowed.!cPretty-printing for CSV fields, shows positional information in addition to the textual content."ÿOutput a table back to a lazily-constructed string. There are lots of possible design decisions one could take, e.g. to re-arrange columns back into something resembling their original order, but here we just take the given table without looking at Row and Field numbers etc.#¾Output a table back to a lazily-constructed bytestring, using the given delimiter char. The Boolean argument is to repair fields containing newlines, by replacing the nl with a space.$fConvert a CSV table to a simpler representation, by dropping all the original location information.%òConvert 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 quotation marks are automatically marked as such.&ÿSelect and/or re-arrange columns from a CSV table, based on names in the header row of the table. The original header row is re-arranged too. The result is either a list of column names that were not present, or the (possibly re-arranged) sub-table.'bValidate that the columns of a table have exactly the names and ordering given in the argument.(sA join operator, adds the columns of two tables together. Precondition: the tables have the same number of rows.)sA generator for a new CSV column, of arbitrary length. The result can be joined to an existing table if desired.*ÔGenerate a fresh field with the given textual content. The quoting flag is set automatically based on the text. Textual extents are not particularly useful, since there was no original input to refer to.AVWXYZ[ \]^_`abcdefgh !"#ijk$%&'()*+  !"#$%&'()*4    !"#$%&')(*'VWXYZ[    \]^_`abcdefgh !"#ijk$%&'()* Safe-Inferred+ÇThe result of parsing a CSV input is a mixed collection of errors and valid rows. This way of representing things is crucial to the ability to parse lazily whilst still catching format errors.,4A structured error type for CSV formatting mistakes.9ÿA CSV field's content is stored with its logical row and column number, as well as its textual extent. This information is necessary if you want to generate good error messages in a secondary parsing stage, should you choose to convert the textual fields to typed data values.C'A CSV row is just a sequence of fields.DOA CSV table is a sequence of rows. All rows have the same number of fields.E/Extract just the valid portions of a CSV parse.F)Extract just the errors from a CSV parse.GdExtract the full table, including invalid rows, repaired with padding. and de-duplicated headers.H:The header row of the CSV table, assuming it is non-empty.IòA first-stage parser for CSV (comma-separated values) data. The individual fields remain as text, but errors in CSV formatting are reported. Errors (containing unrecognisable rows/fields) are interspersed with the valid rows/fields.JÿÞSometimes CSV is not comma-separated, but delimiter-separated values (DSV). The choice of delimiter is arbitrary, but semi-colon is common in locales where comma is used as a decimal point, and tab is also common. The Boolean argument is whether newlines should be accepted within quoted fields. The CSV RFC says newlines can occur in quotes, but other DSV formats might say otherwise. You can often get better error messages if newlines are disallowed.K/Some pretty-printing for structured CSV errors.LcPretty-printing for CSV fields, shows positional information in addition to the textual content.MˆTurn a full CSV table back into text, as much like the original input as possible, e.g. preserving quoted/unquoted format of fields.NíTurn a full CSV table back into text, using the given delimiter character. Quoted/unquoted formatting of the original is preserved. The Boolean argument is to repair fields containing newlines, by replacing the nl with a space.OfConvert a CSV table to a simpler representation, by dropping all the original location information.PòConvert 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 quotation marks are automatically marked as such.QÿSelect and/or re-arrange columns from a CSV table, based on names in the header row of the table. The original header row is re-arranged too. The result is either a list of column names that were not present, or the (possibly re-arranged) sub-table.RhValidate that the named columns of a table have exactly the names and ordering given in the argument.SsA join operator, adds the columns of two tables together. Precondition: the tables have the same number of rows.TsA generator for a new CSV column, of arbitrary length. The result can be joined to an existing table if desired.UÔGenerate a fresh field with the given textual content. The quoting flag is set automatically based on the text. Textual extents are not particularly useful, since there was no original input to refer to.<lmnopq+,-./0123456789:;<=>?@ABCDEFGHIJrstuvwxyKLMNz{|OPQRSTU++,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTU4DC9<:=>?@AB=>?@;,421.-5678567336/0+FEGHIJKLMNOPQRTSU"lmnopq+,421.-5678567336/09 <:=>?@AB=>?@;CDEFGHIJrstuvwxyKLMNz{|OPQRSTU}      !"#$%&'()*+,      !"#$%&'()*+,--./0123456789:;<=>?@A--./012345678:?@ABlazy-csv-0.5.1Text.CSV.Lazy.ByteStringText.CSV.Lazy.String CSVResultCSVErrorNoDataDuplicateHeadercsvHeaderSerial 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