h)]W      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0.2.0.0 Safe-Inferred'^& 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe'6;= uu-tc-error-errorThe data type  represents source positions. It contains the name of the source file, a line number, and a column number. Source line and column positions change intensively during parsing, so we need to make them strict to avoid memory leaks.uu-tc-error-errorName of source file uu-tc-error-error Line number uu-tc-error-error Column number uu-tc-error-errorThe exception is thrown by - when its argument is not a positive number. uu-tc-error-error-Contains the actual value that was passed to  uu-tc-error-error  is the type for positive integers. This is used to represent line number, column number, and similar things like indentation level. 4 instance can be used to safely and efficiently add   es together.uu-tc-error-errorConstruction of   from . The function throws  $ when given a non-positive argument.uu-tc-error-errorExtract  from  .uu-tc-error-errorPosition with value 1.uu-tc-error-errorValue of tab width used by default. Always prefer this constant when you want to refer to the default tab width because actual value may change in future. Currently: defaultTabWidth = mkPos 8uu-tc-error-errorConstruct initial position (line 1, column 1) given name of source file.uu-tc-error-errorPretty-print a .       2015@present Megaparsec contributors  2007 Paolo Martini  1999@2001 Daan LeijenFreeBSD$Mark Karpov  experimentalportableSafe '56; *uu-tc-error-errorA special kind of state that is used to calculate line/column positions on demand.,uu-tc-error-errorThe rest of input to process-uu-tc-error-error%Offset corresponding to beginning of ,.uu-tc-error-error.Source position corresponding to beginning of ,/uu-tc-error-error'Tab width to use for column calculation0uu-tc-error-error#Prefix to prepend to offending line1uu-tc-error-error=This is the Megaparsec's state parametrized over stream type s" and custom error component type e.3uu-tc-error-errorThe rest of input to process4uu-tc-error-error!Number of processed tokens so far5uu-tc-error-error.State that is used for line/column calculation6uu-tc-error-errorCollection of @delayed@ )s in reverse order. This means that the last registered error is the first element of the list.7 uu-tc-error-errorGiven the name of the source file and the input construct the initial state for a parser.8 uu-tc-error-errorGiven the name of source file and the input construct the initial positional state.7uu-tc-error-error)Name of the file the input is coming fromuu-tc-error-errorInput8uu-tc-error-error)Name of the file the input is coming fromuu-tc-error-errorInput1234567*+,-./081234567*+,-./08& 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe%&'2uu-tc-error-error5An internal helper state type combining a difference  and an unboxed .C uu-tc-error-errorType class for inputs that can also be used for error reporting.Duu-tc-error-errorGiven an offset o and initial *?, adjust the state in such a way that it starts at the offset.Return two values (in order): 8 representing the line on which the given offset o% is located. It can be omitted (i.e. ); in that case error reporting functions will not show offending lines. If returned, the line should satisfy a number of conditions that are described below. The updated *; which can be in turn used to locate another offset o' given that o' >= o.The  representing the offending line in input stream should satisfy the following:It should adequately represent location of token at the offset of interest, that is, character at   of the returned . should correspond to the token at the offset o.-It should not include the newline at the end.It should not be empty, if the line happens to be empty, it should be replaced with the string "".Tab characters should be replaced by appropriate number of spaces, which is determined by the / field of *.Note=: type signature of the function was changed in the version 9.0.0.Euu-tc-error-error A version of D that may be faster because it doesn't need to fetch the line at which the given offset in located.#The default implementation is this: 3reachOffsetNoLine o pst = snd (reachOffset o pst)Note=: type signature of the function was changed in the version 8.0.0.F uu-tc-error-error:Type class for inputs that can also be used for debugging.Guu-tc-error-errorPretty-print non-empty stream of tokens. This function is also used to print single tokens (represented as singleton lists).Huu-tc-error-errorReturn the number of characters that a non-empty stream of tokens spans. The default implementation is sufficient if every token spans exactly 1 character.I uu-tc-error-error*This wrapper selects the no-input-sharing O implementation for  () and  (). This means that our parsers will create independent copies rather than using slices of the input. See also the documentation of .More importantly, any parser output will be independent of the input, and holding on to parts of the output will never prevent the input from being garbage collected.1For maximum performance you might consider using L& instead, but beware of its pitfalls!L uu-tc-error-error'This wrapper selects the input-sharing O implementation for  () and  (). By input sharing we mean that our parsers will use slices whenever possible to avoid having to copy parts of the input. See also the documentation of .Note that using slices is in general faster than copying; on the other hand it also has the potential for causing surprising memory leaks: if any slice of the input survives in the output, holding on to the output will force the entire input /* to stay in memory! Even when using lazy / we will hold on to whole chunks at a time leading to to significantly worse memory residency in some cases.See I for a somewhat slower implementation that avoids this memory leak scenario.Ouu-tc-error-error:Type class for inputs that can be consumed by the library.Note that the O instances for Text and  ByteString4 (strict and lazy) default to "input sharing" (see L, I). We plan to move away from input sharing in a future major release; if you want to retain the current behaviour and are concerned with maximum performance you should consider using the L wrapper explicitly.Note: before the version 9.0.0& the class included the methods from F and C.Puu-tc-error-errorType of token in the stream.Quu-tc-error-errorType of @chunk@ of the stream.Ruu-tc-error-errorLift a single token to chunk of the stream. The default implementation is: +tokenToChunk pxy = tokensToChunk pxy . pureHowever for some types of stream there may be a more efficient way to lift.Suu-tc-error-errorThe first method that establishes isomorphism between list of tokens and chunk of the stream. Valid implementation should satisfy: .chunkToTokens pxy (tokensToChunk pxy ts) == tsTuu-tc-error-errorThe second method that establishes isomorphism between list of tokens and chunk of the stream. Valid implementation should satisfy: 4tokensToChunk pxy (chunkToTokens pxy chunk) == chunkUuu-tc-error-error'Return length of a chunk of the stream.Vuu-tc-error-errorCheck if a chunk of the stream is empty. The default implementation is in terms of the more general U: +chunkEmpty pxy ts = chunkLength pxy ts <= 0However for many streams there may be a more efficient implementation.Wuu-tc-error-error/Extract a single token form the stream. Return  if the stream is empty.Xuu-tc-error-errorX n s) should try to extract a chunk of length n, or if the stream is too short, the rest of the stream. Valid implementation should follow the rules:If the requested length n is 0 (or less), * should never be returned, instead  ("", s)" should be returned, where ""! stands for the empty chunk, and s1 is the original stream (second argument).If the requested length is greater than 0 and the stream is empty, , should be returned indicating end of input.%In other cases, take chunk of length n (or shorter if the stream is not long enough) from the input stream and return the chunk along with the rest of the stream.Yuu-tc-error-errorExtract chunk of the stream taking tokens while the supplied predicate returns .. Return the chunk and the rest of the stream.For many types of streams, the method allows for significant performance improvements, although it is not strictly necessary from conceptual point of view.uu-tc-error-error9Create an independent copy of a TL.Text, akin to BL.copy.uu-tc-error-error+A helper definition to facilitate defining D for various stream types.uu-tc-error-errorLike  but for E.uu-tc-error-errorLike  but accepts the index as an .uu-tc-error-errorLike  but accepts the index as an .uu-tc-error-errorstringPretty s) returns pretty representation of string s>. This is used when printing string tokens in error messages.uu-tc-error-error charPretty ch returns user-friendly string representation of given character ch', suitable for using in error messages.uu-tc-error-errorIf the given character has a pretty representation, return that, otherwise . This is an internal helper.uu-tc-error-error3Replace tab characters with given number of spaces.Z uu-tc-error-error[ uu-tc-error-errorDuu-tc-error-errorOffset to reachuu-tc-error-errorInitial * to useuu-tc-error-error#See the description of the functionEuu-tc-error-errorOffset to reachuu-tc-error-errorInitial * to useuu-tc-error-error)Reached source position and updated stateuu-tc-error-error)How to split input stream at given offsetuu-tc-error-errorHow to fold over input streamuu-tc-error-error,How to convert chunk of input stream into a uu-tc-error-errorHow to convert a token into a uu-tc-error-errorNewline token and tab tokenuu-tc-error-errorOffset to reachuu-tc-error-errorInitial * to useuu-tc-error-errorLine at which  is located, updated *uu-tc-error-error)How to split input stream at given offsetuu-tc-error-errorHow to fold over input streamuu-tc-error-errorNewline token and tab tokenuu-tc-error-errorOffset to reachuu-tc-error-errorInitial * to useuu-tc-error-errorUpdated *OQPRSTUVWXYLMNIJKFGHCDEOQPRSTUVWXYLMNIJKFGHCDE& 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe%&'568;F )uu-tc-error-error) s e= represents a parse error parametrized over the stream type s and the custom data e. and  instances of the data type allow us to merge parse errors from different branches of parsing. When merging two )s, the longest match is preferred; if positions are the same, custom data sets and collections of message items are combined. Note that fancy errors take precedence over trivial errors in merging.ruu-tc-error-error:The type class defines how to print a custom component of ).suu-tc-error-errorPretty-print a component of ).tuu-tc-error-errorLength of the error component in characters, used for highlighting of parse errors in input string.uuu-tc-error-errorA non-empty collection of )s equipped with * that allows us to pretty-print the errors efficiently and correctly.wuu-tc-error-errorA collection of )'s that is sorted by parse error offsetsxuu-tc-error-error2The state that is used for line/column calculationyuu-tc-error-errorTrivial errors, generated by the Megaparsec's machinery. The data constructor includes the offset of error, unexpected token (if any), and expected tokens.6Type of the first argument was changed in the version 7.0.0.zuu-tc-error-errorFancy, custom errors.6Type of the first argument was changed in the version 7.0.0.{uu-tc-error-errorAdditional error data, extendable by user. When no custom data is necessary, the type is typically indexed by  to @cancel@ the ~ constructor.|uu-tc-error-error has been used in parser monad}uu-tc-error-errorIncorrect indentation error: desired ordering between reference level and actual level, reference indentation level, actual indentation level~uu-tc-error-errorCustom error datauu-tc-error-errorA data type that is used to represent @unexpected/expected@ items in )). It is parametrized over the token type t.uu-tc-error-errorNon-empty stream of tokensuu-tc-error-errorLabel (cannot be empty)uu-tc-error-error End of inputuu-tc-error-errorModify the custom data component in a parse error. This could be done via  if not for the  constraint.uu-tc-error-errorGet the offset of a ).uu-tc-error-errorSet the offset of a ).uu-tc-error-errorMerge two error data structures into one joining their collections of message items and preferring the longest match. In other words, earlier error message is discarded. This may seem counter-intuitive, but  is only used to merge error messages of alternative branches of parsing and in this case longest match should be preferred.uu-tc-error-errorAttach es to items in a  container given that there is a projection allowing us to get an offset per item.?Items must be in ascending order with respect to their offsets.uu-tc-error-errorPretty-print a u. All )s in the bundle will be pretty-printed in order together with the corresponding offending lines by doing a single pass over the input stream. The rendered  always ends with a newline.uu-tc-error-errorPretty-print a ). The rendered  always ends with a newline.uu-tc-error-error!Pretty-print a textual part of a )=, that is, everything except for its position. The rendered  always ends with a newline. uu-tc-error-errorPretty-print an .uu-tc-error-error5Get length of the @pointer@ to display under a given .uu-tc-error-errorPretty-print an {.uu-tc-error-error5Get length of the @pointer@ to display under a given {.uu-tc-error-errorTransform a list of error messages into their textual representation.uu-tc-error-errorPrint a pretty list where items are separated with commas and the word @or@ according to the rules of English punctuation.uu-tc-error-error)How to project offset from an item (e.g. )uu-tc-error-errorThe collection of itemsuu-tc-error-errorInitial *uu-tc-error-errorThe collection with es added and the final *uu-tc-error-errorParse error bundle to displayuu-tc-error-errorTextual rendition of the bundleuu-tc-error-errorParse error to renderuu-tc-error-errorResult of renderinguu-tc-error-errorParse error to renderuu-tc-error-errorResult of renderinguu-tc-error-errorPrefix to prependuu-tc-error-errorCollection of messagesuu-tc-error-errorResult of rendering{|~})zyuvwxrst{|~})zyuvwxrst& 2015@present Megaparsec contributorsFreeBSD$Mark Karpov  experimentalportableSafe%&'568;Ouu-tc-error-error:The type class defines how to print a custom component of ).uu-tc-error-errorPretty-print a component of ).uu-tc-error-errorLength of the error component in characters, used for highlighting of parse errors in input string.uu-tc-error-errorA non-empty collection of )s equipped with * that allows us to pretty-print the errors efficiently and correctly.uu-tc-error-errorA collection of )'s that is sorted by parse error offsetsuu-tc-error-error2The state that is used for line/column calculationuu-tc-error-errorModify the custom data component in a parse error. This could be done via  if not for the  constraint.uu-tc-error-errorGet the offset of a ).uu-tc-error-errorSet the offset of a ).uu-tc-error-errorAttach es to items in a  container given that there is a projection allowing us to get an offset per item.?Items must be in ascending order with respect to their offsets.uu-tc-error-errorPretty-print a ). The rendered  always ends with a newline.uu-tc-error-error!Pretty-print a textual part of a )=, that is, everything except for its position. The rendered  always ends with a newline. uu-tc-error-errorPretty-print an .uu-tc-error-errorPretty-print an {.uu-tc-error-errorTransform a list of error messages into their textual representation.uu-tc-error-errorPrint a pretty list where items are separated with commas and the word @or@ according to the rules of English punctuation.uu-tc-error-error)How to project offset from an item (e.g. )uu-tc-error-errorThe collection of itemsuu-tc-error-errorInitial *uu-tc-error-errorThe collection with es added and the final *uu-tc-error-errorParse error to renderuu-tc-error-errorResult of renderinguu-tc-error-errorParse error to renderuu-tc-error-errorResult of renderinguu-tc-error-errorPrefix to prependuu-tc-error-errorCollection of messagesuu-tc-error-errorResult of rendering{|~})zy{|~})zy Safe-Inferred'W uu-tc-error-errorpretty prints a  like ( but makes error messages bearable for  Parser Char.  is always preferable to .if you see the following GHC error, you usually need to add an  constraint to your function. Overlapping instances for ErrorsPretty arising from a use of @errorBundlePrettyImproved@ uu-tc-error-errorexpecteduu-tc-error-errormessageuu-tc-error-errorupper limit of positions where to collect errors from. a value of zero turns off error reporting. a negative value causes all errors to be reported.uu-tc-error-error:upper limit of symbols to show before the offending symboluu-tc-error-error9upper limit of symbols to show after the offending symboluu-tc-error-errordefault configuration, setting  to 1,  to 16, and  to 15.uu-tc-error-errorset a configuration's uu-tc-error-errorset a configuration's uu-tc-error-errorset a configuration's uu-tc-error-errorpretty prints a  like ) but with much worse error messages for  Parser Char.  is always preferable to .uu-tc-error-errorreturns [] in the case of  and prints the # to standard error (stderr) using .uu-tc-error-erroran * constraint is automatically fulfilled by  instances.uu-tc-error-errorexpecteduu-tc-error-erroractualuu-tc-error-errormessageuu-tc-error-erroractualuu-tc-error-error entire inputuu-tc-error-errornew uu-tc-error-errornew uu-tc-error-errornew uu-tc-error-error entire input       !"#$%&'()*+,-./001234566789:;<=>?@ABCDEFGHIJKLMMNOOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwwxyz{|}~Stuvwwxy//ww!uu-tc-error-error-0.2.0.0-inplaceData.DifferenceListText.Megaparsec.PosText.Megaparsec.ErrorText.Megaparsec.StateText.Megaparsec.StreamText.Megaparsec.ErrorListParseLib.Erroruu-tc-error-errorDifferenceList singleton$fFoldableDifferenceList$fMonoidDifferenceList$fSemigroupDifferenceList SourcePos sourceName sourceLine sourceColumnInvalidPosExceptionPosmkPosunPospos1defaultTabWidth initialPossourcePosPretty $fReadPos$fSemigroupPos$fNFDataInvalidPosException$fExceptionInvalidPosException$fNFDataSourcePos$fShowSourcePos$fReadSourcePos $fEqSourcePos$fOrdSourcePos$fDataSourcePos$fGenericSourcePos$fEqInvalidPosException$fShowInvalidPosException$fDataInvalidPosException$fGenericInvalidPosException $fShowPos$fEqPos$fOrdPos $fDataPos $fGenericPos $fNFDataPos ParseErrorPosState pstateInput pstateOffsetpstateSourcePospstateTabWidthpstateLinePrefixState stateInput stateOffset statePosStatestateParseErrors initialStateinitialPosState$fNFDataPosState $fNFDataState$fGenericState$fShowPosState $fEqPosState$fDataPosState$fGenericPosState $fDataState $fEqState $fShowStateTraversableStream reachOffsetreachOffsetNoLine VisualStream showTokens tokensLength NoShareInputunNoShareInput ShareInput unShareInputStreamTokenTokens tokenToChunk tokensToChunk chunkToTokens chunkLength chunkEmptytake1_takeN_ takeWhile_ $fStreamSeq $fStream[] $fStreamText $fStreamText0$fStreamByteString$fStreamByteString0$fStreamShareInput$fStreamShareInput0$fStreamShareInput1$fStreamShareInput2$fStreamNoShareInput$fStreamNoShareInput0$fStreamNoShareInput1$fStreamNoShareInput2$fVisualStreamText$fVisualStreamText0$fVisualStreamByteString$fVisualStreamByteString0$fVisualStream[]$fTraversableStreamText$fTraversableStreamText0$fTraversableStreamByteString$fTraversableStreamByteString0$fTraversableStream[]ShowErrorComponentshowErrorComponenterrorComponentLenParseErrorBundle bundleErrorsbundlePosState TrivialError FancyError ErrorFancy ErrorFailErrorIndentation ErrorCustom ErrorItemLabel EndOfInput mapParseError errorOffsetsetErrorOffsetattachSourcePoserrorBundlePrettyparseErrorPrettyparseErrorTextPretty showErrorItem$fNFDataErrorItem$fNFDataErrorFancy$fMonoidParseError$fSemigroupParseError$fNFDataParseError$fNFDataParseErrorBundle$fShowErrorComponentVoid$fExceptionParseErrorBundle$fExceptionParseError$fGenericParseErrorBundle$fGenericParseError$fShowErrorFancy$fReadErrorFancy$fEqErrorFancy$fOrdErrorFancy$fDataErrorFancy$fGenericErrorFancy$fFunctorErrorFancy$fShowErrorItem$fReadErrorItem $fEqErrorItem$fOrdErrorItem$fDataErrorItem$fGenericErrorItem$fFunctorErrorItem$fDataParseErrorBundle$fEqParseErrorBundle$fShowParseErrorBundle$fDataParseError$fEqParseError$fShowParseErrorFail ErrorsPrettyerrorBundlePrettyImproved WithLengthBundledParseError BundledFailConfig errorCount symbolsBefore symbolsAfter defaultConfig errorCountSetsymbolsBeforeSetsymbolsAfterSettraceErrorMessagetoBundletoMegaparsecBundletoMegaparsecBundled toErrorItem toBundled inputRestGet groupWithKey$fErrorsPrettyChar$fErrorsPrettysymbol$fOrdParseErrorBundle$fEqWithLength$fOrdWithLength$fShowWithLength$fEqBundledParseError$fOrdBundledParseError$fShowBundledParseError $fEqConfig $fOrdConfig $fShowConfigbaseGHC.Base Semigroupghc-prim GHC.TypesIntStString GHC.MaybeMaybeNothing text-2.0.2Data.Text.InternalTextData.Text.Internal.Lazybytestring-0.11.5.1Data.ByteString.Internal.Type ByteStringData.ByteString.Lazy.Internal Data.TextcopysplitJustTruetlCopy reachOffset'reachOffsetNoLine' splitAtBLData.ByteString.LazysplitAt splitAtTLData.Text.Lazy stringPretty charPretty charPretty' expandTabCharMonoid Data.VoidVoidControl.Monad.Failfailfmap GHC.ClassesOrd mergeErrorData.Traversable TraversableerrorItemLengthshowErrorFancyerrorFancyLengthmessageItemsPrettyorList Data.EitherLeft Debug.TracetraceGHC.ShowShow