!1b"z      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safe X(C) CSIRO 2017-2018BSD3-George Wilson <george.wilson@data61.csiro.au> experimental non-portableNone6KN0sv-core is C with both type parameters the same, as should usually be the casesv-coreG is a decoder that looks for a column by name rather than by position.sv-core is the error-accumulating  underlying  sv-core  is a  full of  %. It is used as the error side of a 6. When multiple errors occur, they will be collected. sv-core  is a value indicating what went wrong during a parse or decode. Its constructor indictates the type of error which occured, and there is usually an associated string with more finely-grained details. sv-core?I was looking for another field, but I am at the end of the row sv-core;I should be at the end of the row, but I found extra fieldssv-core!This decoder was built using the  categorical primitive for categorical datasv-core9Looked for a column with this name, but could not find itsv-core5There should have been a header but there was nothingsv-coresv is misconfiguredsv-core<The parser failed, meaning decoding proper didn't even beginsv-core+Some other kind of decoding failure occuredsv-core)Newtype for indices into the field vectorsv-core=As we decode a row of data, we walk through its fields. This  keeps track of our position.sv-core is y with the input and error types the same. You usually want them to be the same, and most primitives are set up this way.sv-coreA  e s a: is for decoding some fields from a CSV row into our type a.The second type parameter (s%) is the input string type (usually  ByteString or Text). The first type parameter (e) is the type of strings which occur in errors. Under most circumstances you want these type paraters to coincide, but they don't have to. They are two separate type parameters instead of one so that  can have a  instance.There are primitive Qs, and combinators for composing or otherwise manipulating them. In particular,  is an  functor and an 2 from the semigroupoids package, also known as a SemiAlternative. is not a 7, but we can perform monad-like operations on it with   or  sv-coreConvenient constructor for , that handles all the newtype noise for you.sv-core(Convenient function to run a DecodeState   (C) CSIRO 2017-2018BSD3-George Wilson <george.wilson@data61.csiro.au> experimental non-portableNoneE @sv-coreBuild a failing Asv-core Fail with  Bsv-core Fail with  K. This takes the rest of the row, so that it can be displayed to the user.Csv-core Fail with F. It takes the unknown value and the list of good categorical values.%This mostly exists to be used by the   function.Dsv-core Fail with 1 with the given column name. This is for when a ' looks for a column that doesn't exist.Esv-core Fail with . This is for when the user asks for a header but the input document is completely empty (that is, it has nothing that could be considered a header).Fsv-core Fail with F. This is for when the user has asked for something impossible, like to decode a CSV by column name while asserting there's no header.Gsv-core Fail with b with the given message. This is for when the parse step fails, and decoding does not even begin.Hsv-core Fail with d with the given message. This is something of a generic error for when decoding a field goes wrong.Isv-coreBuild a  from an Jsv-coreBuild a  from an &, given a function to build the error.Ksv-coreBuild a  from a -. You have to supply an error to use in the  caseLsv-core Convert a  Text.Trifecta  to a  @ABCDEFGHIJKL  @ABCDEFGHIJKL(C) CSIRO 2017-2018BSD3-George Wilson <george.wilson@data61.csiro.au> experimental non-portableNoneQVE8Msv-core:Decodes a sv into a list of its values using the provided Nsv-coreBuild a  , given a function that returns ./Return the given error if the function returns .Osv-coreBuild a  , given a function that returns .Psv-coreBuild a  , given a function that returns %, and a function to build the error.Qsv-coreIGet the contents of a field without doing any decoding. This never fails.Rsv-coreGrab the whole row as a Ssv-core`Get a field that's a single char. This will fail if there are mulitple characters in the field.Tsv-core,Get the contents of a field as a bytestring. Alias for QUsv-core-Get the contents of a UTF-8 encoded field as AThis will also work for ASCII text, as ASCII is a subset of UTF-8Vsv-core&Get the contents of a field as a lazy Wsv-core&Get the contents of a field as a lazy Xsv-core!Get the contents of a field as a Ysv-corePThrow away the contents of a field. This is useful for skipping unneeded fields.Zsv-core?Throw away the contents of a field, and return the given value.[sv-core.Decode exactly the given string, or else fail.\sv-coreDecode a UTF-8  field as an ]sv-coreDecode a UTF-8  field as an ^sv-coreDecode a UTF-8  field as a _sv-coreDecode a UTF-8  field as a This is much faster than `@ but can be less precise. If you're not sure which to use, use `.See the documentation for  for more information.`sv-coreDecode a UTF-8  as any  type (usually )VThis is slower than 'double ' but more precise. If you're not sure which to use, use `.See the documentation for  for more information.asv-coreDecode a field as a AThis aims to be tolerant to different forms a boolean might take.bsv-coreDecode a field as a U. This version lets you provide the fromString function that's right for you, since  on a Q will do the wrong thing in the case of many encodings such as UTF-16 or UTF-32.AThis aims to be tolerant to different forms a boolean might take.csv-core6Succeed only when the given field is the empty string.JThe empty string surrounded in quotes or spaces is still the empty string.dsv-coreChoose the leftmost  that succeeds. Alias for esv-coreChoose the leftmost  that succeeds. Alias for fsv-coreTry the given $. If it fails, instead succeed with .gsv-core/If the field is the empty string, succeed with . Otherwise try the given .hsv-coreTry the given 2. If it fails, succeed without consuming anything."This usually isn't what you want. f and g% are more likely what you are after.isv-core>Try the first, then try the second, and wrap the winner in an .=This is left-biased, meaning if they both succeed, left wins.jsv-core>Try the given decoder, otherwise succeed with the given value.ksv-coreJTry the given decoder, or if it fails succeed with the given value, in an .lsv-coreUDecode categorical data, given a list of the values and the strings which match them.>Usually this is used with sum types with nullary constructors. fdata TrafficLight = Red | Amber | Green categorical [(Red, "red"), (Amber, "amber"), (Green, "green")]msv-core[Decode categorical data, given a list of the values and lists of strings which match them.This version allows for multiple strings to match each value, which is useful for when the categories are inconsistently labelled. data TrafficLight = Red | Amber | Green categorical' [(Red, ["red", "R"]), (Amber, ["amber", "orange", "A"]), (Green, ["green", "G"])]5For another example of its usage, see the source for a.nsv-coreUse the + instance to try to decode the given value.osv-coreUse the R instance to try to decode the given value, or fail with the given error message.psv-coreUse the X instance to try to decode the given value, or use the value to build an error message.sv-core1Given the name of a type, try to decode it using , qsv-coreMap over the errors of a .To map over the other two parameters, use the  instance.rsv-coreThis transforms a  Decode' s a into a  Decode' t a`. It needs functions in both directions because the errors can include fragments of the input. @alterInput :: (s -> t) -> (t -> s) -> Decode' s a -> Decode' t assv-coreBuild a  from a Trifecta parsertsv-coreBuild a  from an Attoparsec parserusv-coreBuild a  from a Parsec parservsv-coreBuild a  from a  Data.Text wsv-coreThis can be used to build a / whose value depends on the result of another ". This is especially useful since  is not a .=If you need something like this but with more power, look at yxsv-coreflipped wysv-coreBind through a ."This bind does not agree with the \ instance because it does not accumulate multiple error values. This is a violation of the  laws, meaning  is not a .bThat is not to say that there is anything wrong with using this function. It can be quite useful.zsv-coreRun a &, and based on its errors build a new .{sv-coreBuild a  from a function.|sv-core Promotes a  to work on a whole RecordD at once. This does not need to be called by the user. Instead use M.}sv-core Promotes a  to work on a whole RecordD at once. This does not need to be called by the user. Instead use M.wThis version lets the error string and input string type pararms differ, but needs a function to convert between them.~sv-core4Convenience to get the underlying function out of a  in a useful formsv-core4Convenience to get the underlying function out of a  in a useful formsv-core Promote a  to a  that doesn't look for any namessv-coreGiven a header and a 2, resolve header names to positions and return a sv-coreBThis is the primitive for building decoders that work with columnsGLook for the column with the given name and run the given decoder on itsv-coreInfix alias for  Mnemonic: Dot colon names D ecoders, Equal colon names Encoders.Q @ABCGHIJKMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Q  MNOPqrQSTUVWX\]^_`abYZ[cRdehfgijklmwxynopstuvz@ABCGHIJK~{|}w1x15(C) CSIRO 2017-2018BSD3-George Wilson <george.wilson@data61.csiro.au> experimental non-portableSafesv-coreClassy lens for sv-coreDoes the CSV have a Headern or not? A header is a row at the beginning of a file which contains the string names of each of the columns.IIf a header is present, it must not be decoded with the rest of the data.(C) CSIRO 2017-2018BSD3-George Wilson <george.wilson@data61.csiro.au> experimental non-portableSafe+sv-core is a newtype around sv-core Convert a  to a ByteString . This is used by encoding.sv-core*Unix/Linux newlines: a line feed charactersv-coreLDOS newlines: a carriage return character followed by a line feed character(C) CSIRO 2017-2018BSD3-George Wilson <george.wilson@data61.csiro.au> experimental non-portableSafesv-coreClassy lens for sv-core7By what are your values separated? The answer is often , but not always.A  is just a . It could be a sum type instead, since it will usually be comma or pipe, but our preference has been to be open here so that you can use whatever you'd like.sv-core6The venerable comma separator. Used for CSV documents.sv-core+The pipe separator. Used for PSV documents.sv-core!Tab is a separator too - why not?(C) CSIRO 2017-2018BSD3-George Wilson <george.wilson@data61.csiro.au> experimental non-portableSafe (C) CSIRO 2017-2018BSD3-George Wilson <george.wilson@data61.csiro.au> experimental non-portableSafe·sv-coreClassy lenses for  Pimport Control.Lens defaultEncodeOptions & newline .~ crlf & quoting .~ Always sv-coreCThese are options to configure encoding. A default is provided as .sv-coreLAre your values separated by commas, tabs, or something else? Default: commasv-core`Would you like quotes around your values? If so, double quotes or single? Deafult: Double quotessv-core0What kind of newline would you like? Default: LFsv-core9Should the file be terminated with a newline? Default: Nosv-coreWShould the output file have quotes around every value, or only when they are required? Beware the  constructor. It can construct malformed CSV files if there are fields containing quotes, newlines, or separators. It is the fastest option though, so you might like to use it if you're sure none of your encoded data will include those characters.sv-core!The default options for encoding.\The default is a CSV file with quotes when necessary, LF lines, and no terminating newline.(C) CSIRO 2017-2018BSD3-George Wilson <george.wilson@data61.csiro.au> experimental non-portableNoneKsv-coreA  is an  with an attached column name.It is , ,  , and  <, allowing for composition of these values to build bigger s from smaller ones. Notably,  is not  <, since taking the sum of column names does not make sense.sv-coreAn R converts its argument into one or more textual fields, to be written out as CSV.It is , ,  ,  , and  <, allowing for composition of these values to build bigger s from smaller ones. (C) CSIRO 2017-2018BSD3-George Wilson <george.wilson@data61.csiro.au> experimental non-portableNoneV n0sv-coreMake an ! from a function that builds one Field.sv-coreMake an ! from a function that builds one Field.sv-core;Make an encode from any function that returns a ByteString Builder.sv-core&Encode the given list using the given , configured by the given .sv-core4Encode the given list with a header using the given , configured by the given .sv-core,Encode, writing the output to a file handle.sv-core:Encode with a header, writing the output to a file handle.sv-coreJEncode, writing to a file. This way is more efficient than encoding to a  ByteString and then writing to file.sv-coreXEncode with a header, writing to a file. This way is more efficient than encoding to a  ByteString and then writing to file.sv-coreEncode to a ByteString BuilderE, which is useful if you are going to combine the output with other  ByteStrings.sv-core)Encode with column names to a ByteString BuilderE, which is useful if you are going to combine the output with other  ByteStrings.sv-coreEncode one row onlysv-core%Encode one row only, as a ByteString Buildersv-core Encode this  every time, ignoring the input.sv-core Build an  using a type's   instance.sv-coreDon't encode anything.sv-core$Encode anything as the empty string.sv-core$Lift an Encode to be able to hanlde ,, by using the empty string in the case of sv-core Build an  for  given a   and a  encode.sv-core Build an  for  given a  and a   encode.sv-core Build an  for  given a   encode and a  for the  case.sv-core Build an  for  given a  for the  case and a   encode.sv-core5Encode a list as a whole row at once, using the same  for every elementsv-coreEncode a single sv-core Encode an sv-core Encode an sv-core Encode a sv-core Encode a sv-core Encode a sv-core Encode a sv-coreEncode a strict sv-coreEncode a lazy sv-core Encode a  as True or Falsesv-core Encode a  as true of falsesv-core Encode a  as yes or nosv-core Encode a  as Yes or Nosv-core Encode a  as Y or Nsv-core Encode a  as 1 or 0sv-coreAttach a column name to an . This is used for building s with headers.Best used with OverloadedStringssv-core Synonym for . Mnemonic: Dot colon names D ecoders, Equal colon names Encoders.sv-coreGiven an optic from s to a#, Try to use it to build an encode. 2encodeOf :: Iso' s a -> Encode a -> Encode s encodeOf :: Lens' s a -> Encode a -> Encode s encodeOf :: Prism' s a -> Encode a -> Encode s encodeOf :: Traversal' s a -> Encode a -> Encode s encodeOf :: Fold s a -> Encode a -> Encode s encodeOf :: Getter s a -> Encode a -> Encode s `This is very useful when you have a prism for each constructor of your type. You can define an  as follows: myEitherEncode :: Encode a -> Encode b -> Encode (Either a b) myEitherEncode encA encB = encodeOf _Left encA <> encodeOf _Right encB /In this example, when the prism lookup returns ., the empty encoder is returned. This is the  for the } monoid, so it won't add a field to the resulting CSV. This is the behaviour you want for combining a collection of prisms.But this encoder also works with lenses (or weaker optics), which will never fail their lookup, in which case it never returns H. So this actually does the right thing for both sum and product types.sv-coreLike , but you can handle  however you'd like. In Y, it is handled by the Encode which does nothing, but for example you might like to use  to encode an empty field.sv-core Encode a z really quickly. If the string has quotes in it, they will not be escaped properly, so the result maybe not be valid CSVsv-coreEncode x really quickly. If the text has quotes in it, they will not be escaped properly, so the result maybe not be valid CSVsv-coreEncode ByteString  really quickly. If the builder builds a string with quotes in it, they will not be escaped properly, so the result maybe not be valid CSVsv-core Encode a z really quickly. If the string has quotes in it, they will not be escaped properly, so the result maybe not be valid CSVsv-core Encode a z really quickly. If the string has quotes in it, they will not be escaped properly, so the result maybe not be valid CSVsv-core Encode this  really quickly every time, ignoring the input. If the string has quotes in it, they will not be escaped properly, so the result maybe not be valid CSVAA !" !# !$ !%&'()*++,-./0123455667899:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~   p q z { |  v r u       !"#$%&'()*+),-),./01234"sv-core-0.3-LvTTMBnJXro7DqsYUAXPZ6Data.Sv.Decode.ErrorData.Sv.Decode.TypeData.Sv.Decode.CoreData.Sv.Structure.HeadednessData.Sv.Structure.NewlineData.Sv.Structure.SeparatorData.Sv.Encode.OptionsData.Sv.Encode.TypeData.Sv.Encode.CoreData.Sv.Alien.ContainersData.Sv.Decode>>== bindDecode categorical Text.TrifectaResultData.Text.LazyTextData.ByteString.Lazy ByteStringData.Text.ReaddoubleData.Profunctor ProfunctorReaderData.Sv.Structure.CoreData.ByteStringData.ByteString.Strict Data.TextData.ByteString.BuilderBuilder#validation-1-7gJMfL43CTP1e8195Vpz5jData.ValidationbindValidationSuccessFailure Validation NameDecode' NameDecodeNamedunNamedDecodeValidation DecodeErrors DecodeErrorUnexpectedEndOfRowExpectedEndOfRowUnknownCategoricalValue MissingColumn MissingHeader BadConfigBadParse BadDecodeInd DecodeStategetDecodeStateDecode'Decode unwrapDecode buildDecoderunDecodeState$fProfunctorDecodeState$fBindDecodeState$fNFDataDecodeError$fFunctorDecodeError$fNFDataDecodeErrors$fFunctorDecodeErrors$fSemigroupoidTYPEDecode$fProfunctorDecode $fAltDecode$fAltNameDecode$fEqInd$fOrdInd $fShowInd$fFunctorDecodeState$fApplyDecodeState$fApplicativeDecodeState$fMonadDecodeState$fMonadReaderDecodeState$fMonadStateDecodeState$fEqDecodeError$fOrdDecodeError$fShowDecodeError$fGenericDecodeError$fEqDecodeErrors$fOrdDecodeErrors$fShowDecodeErrors$fSemigroupDecodeErrors$fGenericDecodeErrors$fFunctorDecode $fApplyDecode$fApplicativeDecode$fFunctorNameDecode$fApplicativeNameDecode decodeErrorunexpectedEndOfRowexpectedEndOfRowunknownCategoricalValue missingColumn missingHeader badConfigbadParse badDecodevalidateEithervalidateEitherWith validateMaybevalidateTrifectaResultdecode decodeMay decodeEither decodeEither'contentsrowchar byteStringutf8lazyUtf8lazyByteStringstringignorereplaceexactlyintintegerfloatrationalbooleanboolean' emptyFieldchoiceelement ignoreFailureorEmpty optionalFieldeitherorElseorElseE categorical' decodeRead decodeRead'decodeReadWithMsg mapErrors alterInput withTrifectawithAttoparsec withParsecwithTextReader==<<onErrormkDecodepromotepromote' runDecoderunNamed anonymousmakePositionalcolumn.: HasHeadedness headedness HeadednessUnheadedHeaded$fHasHeadednessHeadedness$fEqHeadedness$fOrdHeadedness$fShowHeadednessNewlineUnsafeMkNewline toByteStringnewlineToBuilderlfcrlf $fShowNewline $fEqNewline $fOrdNewline HasSeparator separator Separatorcommapipetab$fHasSeparatorWord8HasEncodeOptions encodeOptionsquotingnewlineterminalNewline EncodeOptions_encodeSeparator_quoting_newline_terminalNewlineQuotingAlwaysAsNeededNeverdefaultEncodeOptions$fHasSeparatorEncodeOptions$fHasEncodeOptionsEncodeOptions NameEncodeunNamedEEncode getEncode$fDecidableEncode$fDivisibleEncode$fContravariantEncode$fMonoidNameEncode$fSemigroupNameEncode$fSemigroupEncode$fMonoidEncode$fContravariantNameEncode$fDivisibleNameEncode mkEncodeBSmkEncodeWithOpts unsafeBuilderencode encodeNamedencodeToHandleencodeNamedToHandle encodeToFileencodeNamedToFile encodeBuilderencodeNamedBuilder encodeRowencodeRowBuilderconstshownopempty?>><Data.Semigroup.Foldableasum1%readable-0.3.1-BcSBcf5TfYB2LKDbOZtqGx Data.ReadableReadable Data.ByteString.Builder.InternalGHC.WordWord8Monoid(contravariant-1.5-3X5fUpXwmB92T5JM8Nn6YAData.Functor.Contravariant Contravariant$Data.Functor.Contravariant.Divisible Divisible DecidableGHC.ShowShowJustCharmempty