úÎ!†J„ò    ©2019 James BrockBSD2"James Brock <jamesbrock@gmail.com>None_B¯replace-attoparsecSeparate and capturePParser combinator to find all of the non-overlapping ocurrences of the pattern sep5 in a text stream. Separate the stream into sections:)sections which can parsed by the pattern sep- will be captured as matching sections in  8non-matching sections of the stream will be captured in  .¨This parser will always consume its entire input and can never fail. If there are no pattern matches, then the entire input stream will be returned as a non-matching   section.The pattern matching parser sepÿ> will not be allowed to succeed without consuming any input. If we allow the parser to match a zero-width pattern, then it can match the same zero-width pattern again at the same position on the next iteration, which would result in an infinite number of overlapping pattern matches. So, for example, the pattern  many digitB, which can match zero occurences of a digit, will be treated by sepCap as  many1 digit,, and required to match at least one digit.This sepCapd parser combinator is the basis for all of the other features of this module. It is similar to the sep* family of functions found in  Yhttp://hackage.haskell.org/package/parser-combinators/docs/Control-Monad-Combinators.htmlparser-combinators and  Lhttp://hackage.haskell.org/package/parsers/docs/Text-Parser-Combinators.htmlparsers8 but, importantly, it returns the parsed result of the sep% parser instead of throwing it away.replace-attoparsec6Find all occurences, parse and capture pattern matchesFParser combinator for finding all occurences of a pattern in a stream. Will call  with the ? combinator so that the text which matched the pattern parser sep will be returned in the  1 sections, along with the result of the parse of sep. Definition: findAllCap sep =  ( sep) replace-attoparsecFind all occurencesFParser combinator for finding all occurences of a pattern in a stream. Will call  with the B combinator and return the text which matched the pattern parser sep in the   sections. Definition: findAll sep = (fmap.fmap) ( fst) $  ( sep) replace-attoparsec Stream editor~Also known as find-and-replace , or match-and-substitute . Finds all of the sections of the stream which match the pattern sep,, and replaces them with the result of the editor function.QThis function is not a parser combinator,  it is a way to run a parser , like  or .*Access the matched section of text in the editor0If you want access to the matched string in the editor, function, then combine the pattern parser sep with 0. This will effectively change the type of the editor function to (ByteString,a) -> ByteString.This allows us to write an editorU function which can choose to not edit the match and just leave it as it is. If the editor< function always returns the first item in the tuple, then  streamEdit changes nothing. So, for all sep:  streamEdit ( sep)  "a  replace-attoparsecStream editor transformerMonad transformer version of .The editor3 function will run in the underlying monad context.If you want to do  operations in the editor function then run this in .If you want the editorE function to remember some state, then run this in a stateful monad.replace-attoparsecGet the * s current offset position in the stream. ,https://github.com/bos/attoparsec/issues/101>  & you know you're in an uncomfortable state of sin :-)   bosreplace-attoparsecThe pattern matching parser sepreplace-attoparsecThe pattern matching parser sepreplace-attoparsecThe pattern matching parser sepreplace-attoparsec The parser sep for the pattern of interest.replace-attoparsecThe editor$ function. Takes a parsed result of sep7 and returns a new stream section for the replacement.replace-attoparsec&The input stream of text to be edited.replace-attoparsec The parser sep for the pattern of interest.replace-attoparsecThe editor$ function. Takes a parsed result of sep7 and returns a new stream section for the replacement.replace-attoparsec&The input stream of text to be edited.©2019 James BrockBSD2"James Brock <jamesbrock@gmail.com>None_„¾replace-attoparsecSeparate and capturePParser combinator to find all of the non-overlapping ocurrences of the pattern sep5 in a text stream. Separate the stream into sections:)sections which can parsed by the pattern sep- will be captured as matching sections in  8non-matching sections of the stream will be captured in  .¨This parser will always consume its entire input and can never fail. If there are no pattern matches, then the entire input stream will be returned as a non-matching   section.The pattern matching parser sepÿ> will not be allowed to succeed without consuming any input. If we allow the parser to match a zero-width pattern, then it can match the same zero-width pattern again at the same position on the next iteration, which would result in an infinite number of overlapping pattern matches. So, for example, the pattern  many digitB, which can match zero occurences of a digit, will be treated by sepCap as  many1 digit,, and required to match at least one digit.This sepCapd parser combinator is the basis for all of the other features of this module. It is similar to the sep* family of functions found in  Yhttp://hackage.haskell.org/package/parser-combinators/docs/Control-Monad-Combinators.htmlparser-combinators and  Lhttp://hackage.haskell.org/package/parsers/docs/Text-Parser-Combinators.htmlparsers8 but, importantly, it returns the parsed result of the sep% parser instead of throwing it away.replace-attoparsec6Find all occurences, parse and capture pattern matchesFParser combinator for finding all occurences of a pattern in a stream. Will call  with the ? combinator so that the text which matched the pattern parser sep will be returned in the  1 sections, along with the result of the parse of sep. Definition: findAllCap sep =  ( sep) replace-attoparsecFind all occurencesFParser combinator for finding all occurences of a pattern in a stream. Will call  with the B combinator and return the text which matched the pattern parser sep in the   sections. Definition: findAll sep = (fmap.fmap) ( fst) $  ( sep) replace-attoparsec Stream editor~Also known as find-and-replace , or match-and-substitute . Finds all of the sections of the stream which match the pattern sep,, and replaces them with the result of the editor function.QThis function is not a parser combinator,  it is a way to run a parser , like  or .*Access the matched section of text in the editor0If you want access to the matched string in the editor, function, then combine the pattern parser sep with 0. This will effectively change the type of the editor function to (Text,a) -> Text.This allows us to write an editorU function which can choose to not edit the match and just leave it as it is. If the editor< function always returns the first item in the tuple, then  streamEdit changes nothing. So, for all sep:  streamEdit ( sep)  "a  replace-attoparsecStream editor transformerMonad transformer version of  .The editor3 function will run in the underlying monad context.If you want to do  operations in the editor function then run this in .If you want the editorE function to remember some state, then run this in a stateful monad. replace-attoparsecGet the * s current offset position in the stream. ,https://github.com/bos/attoparsec/issues/101>  & you know you're in an uncomfortable state of sin :-)   bosreplace-attoparsecThe pattern matching parser sepreplace-attoparsecThe pattern matching parser sepreplace-attoparsecThe pattern matching parser sep replace-attoparsec The parser sep for the pattern of interest.replace-attoparsecThe editor$ function. Takes a parsed result of sep7 and returns a new stream section for the replacement.replace-attoparsec&The input stream of text to be edited. replace-attoparsec The parser sep for the pattern of interest.replace-attoparsecThe editor$ function. Takes a parsed result of sep7 and returns a new stream section for the replacement.replace-attoparsec&The input stream of text to be edited.            1replace-attoparsec-1.0.3.0-4lqopULFgll4T2rl3Ew8JaReplace.Attoparsec.ByteStringReplace.Attoparsec.Text Data.Tuplefst Data.FunctionidsepCap findAllCapfindAll streamEdit streamEditT getOffsetbase Data.EitherRightLeft*attoparsec-0.13.2.3-1B7gC0zLqr66G1FATj1fee#Data.Attoparsec.ByteString.InternalmatchData.Bifunctorsecondparse parseOnlyghc-prim GHC.TypesIOParserData.Attoparsec.Text.Internal