h&.,a      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyCC0-1.0mordae@anilinux.orgunstablenon-portable (ghc) Safe-Inferred&, U snackFails if the value returned by the parser does not conform to the predicate. Generalized form of .Example: 6pInput = takeWhile isLetter `provided` (odd . length) snack"Tries various parsers, one by one.Example: pExpression = choice [ pConstant , pVariable , pBinaryOperation , pFunctionApplication ] snackReplicates the parser given number of times, collecting the results in a list. Fails if any instance of the parser fails.Example: pFourWords = (:) <$> word <*> count 3 (blank *> word) where word = takeWhile1 isLetter blank = takeWhile1 isSpace snackCaptures first parser as Left or the second as Right.snack Shortcut for  with a default value.Example: data Contact = Contact { contactName :: Text , contactEmail :: Maybe Text } pContact = Contact <$> pFullName <*> option pEmail snackLike ", but requires at least one match.snackLike ;, but stops once the second parser matches the input ahead.Example: pBodyLines = pLine `manyTill` pEnd where pLine = takeTill (== 'n') pEnd = string "n.n" snack Similar to 3, but interleaves the first parser with the second.Example: pLines = pLine  char 'n' snackLike ", but requires at least one match. snack!Wraps the parser from both sides.Example: pToken = takeWhile1 (inClass "A-Za-z0-9_") `wrap` takeWhile isSpace !snack4Tests whether the character lies within given range. Definition: *inRange lo hi = c -> (lo <= c && c <= hi) "snack Negation of !. Definition: -notInRange lo hi = c -> (c <= lo || hi <= c)  !"CC0-1.0mordae@anilinux.orgunstablenon-portable (ghc) Safe-Inferred&,"snack Parser for z inputs.snack"Run the parser on specified input.snack9Result represents either success or some kind of failure.You can find the problematic offset by subtracting length of the remainder from length of the original input.snackParser successfully match the input. Produces the parsing result and the remainder of the input.snackParser failed to match the input. Produces list of expected inputs and the corresponding remainder.snack{ was called somewhere during the parsing. Produces the reason and the remainder at the corresponding point with length of the problematic extent.#snack%Accepts a single, matching character.$snack&Accepts a single, differing character.%snackDiscards the remaining input and returns just the parse result. You might want to combine it with 8 for the best effect.Example: )parseOnly (pContacts <* endOfInput) bstr &snackAccepts a single character.'snack2Accepts a single character matching the predicate.(snack5Accepts a single unicode white space character. See  for details.)snack6Accepts multiple unicode white space characters. See  for details.*snack"Peeks ahead, but does not consume.Be careful, peeking behind end of the input fails. You might want to check using 9 beforehand.+snackAccepts a matching string.,snackSame as +, but case insensitive.-snackAccepts given number of characters. Fails when not enough characters are available..snackScans ahead statefully and then accepts whatever characters the scanner liked. Scanner returns |& to mark end of the acceptable extent./snackLike .+, but also returns the final scanner state.0snackEfficiently consume as long as the input characters match the predicate. An inverse of 2.1snackLike 0+, but requires at least a single character.2snackEfficiently consume until a character matching the predicate is found. An inverse of 0.3snackSame as 2+, but requires at least a single character.4snackMakes the parser not only return the result, but also the original matched extent.5snackNames an extent of the parser.When the extent returns a Failure, details are discarded and replaced with the extent as a whole.When the extent returns an Error, it is adjusted to cover the whole extent, but the reason is left intact.You should strive to make labeled extents as small as possible, approximately of a typical token size. For example: ;pString = label "string" $ pStringContents `wrap` char '"' 6snack(Marks an unlabelel extent of the parser.When the extent returns an Error, it is adjusted to cover the whole extent, but the reason is left intact.7snackAccept whatever input remains.8snack7Accepts end of input and fails if we are not there yet.9snack3Returns whether we are at the end of the input yet.:snackAccepts optional '+' or '-'? character and then applies it to the following parser result.;snack1Accepts an integral number in the decimal format.<snackAccepts an integral number in the hexadecimal format in either case. Does not look for 0x or similar prefixes.=snack/Accepts an integral number in the octal format.>snackAccepts a fractional number as a decimal optinally followed by a colon and the fractional part. Does not support exponentiation.6 #$%&'()*+,-./0123456789:;<=>6%#$&'()*+,-./0123:;<=> 456789CC0-1.0mordae@anilinux.orgunstablenon-portable (ghc) Safe-Inferred&,# snack Parser for } inputs. snack"Run the parser on specified input. snack9Result represents either success or some kind of failure.You can find the problematic offset by subtracting length of the remainder from length of the original input. snackParser successfully match the input. Produces the parsing result and the remainder of the input.snackParser failed to match the input. Produces list of expected inputs and the corresponding remainder.snack{ was called somewhere during the parsing. Produces the reason and the remainder at the corresponding point with length of the problematic extent.Hsnack Accepts a single, matching byte.Isnack!Accepts a single, differing byte.JsnackDiscards the remaining input and returns just the parse result. You might want to combine it with Z for the best effect.Example: )parseOnly (pContacts <* endOfInput) bstr KsnackAccepts a single byte.Lsnack-Accepts a single byte matching the predicate.Msnack"Peeks ahead, but does not consume.Be careful, peeking behind end of the input fails. You might want to check using [ beforehand.NsnackAccepts a matching string.OsnackAccepts given number of bytes. Fails when not enough bytes are available.PsnackScans ahead statefully and then accepts whatever bytes the scanner liked. Scanner returns |& to mark end of the acceptable extent.QsnackLike P+, but also returns the final scanner state.RsnackEfficiently consume as long as the input bytes match the predicate. An inverse of T.SsnackLike R&, but requires at least a single byte.TsnackEfficiently consume until a byte matching the predicate is found. An inverse of R.UsnackSame as T&, but requires at least a single byte.VsnackMakes the parser not only return the result, but also the original matched extent.WsnackNames an extent of the parser.When the extent returns a Failure, details are discarded and replaced with the extent as a whole.When the extent returns an Error, it is adjusted to cover the whole extent, but the reason is left intact.You should strive to make labeled extents as small as possible, approximately of a typical token size. For example: ;pString = label "string" $ pStringContents `wrap` char '"' Xsnack(Marks an unlabelel extent of the parser.When the extent returns an Error, it is adjusted to cover the whole extent, but the reason is left intact.YsnackAccept whatever input remains.Zsnack7Accepts end of input and fails if we are not there yet.[snack3Returns whether we are at the end of the input yet.-  HIJKLMNOPQRSTUVWXYZ[- JHIKLMNOPQRSTU VWXYZ[CC0-1.0mordae@anilinux.orgunstablenon-portable (ghc) Safe-Inferred&,+esnack+Accepts a single, matching ASCII character.fsnack,Accepts a single, differing ASCII character.gsnackAccepts a single character.hsnack2Accepts a single character matching the predicate.isnack3Accepts a single ASCII white space character. See k for details.jsnack4Accepts multiple ASCII white space characters. See k for details.ksnackTrue for any of the #[' ', '\t', '\n', '\v', '\f', '\r'] characters.Please note that Data.Text.Parser re-exports , that considers more unicode codepoints, making it significantly slower.lsnack"Peeks ahead, but does not consume.Be careful, peeking behind end of the input fails. You might want to check using [ beforehand.msnackAccepts a matching string. Matching is performed in a case-insensitive manner under ASCII.~snack"Perform simple ASCII case folding.nsnackAccepts given number of bytes. Fails when not enough bytes are available.osnackScans ahead statefully and then accepts whatever bytes the scanner liked. Scanner returns |& to mark end of the acceptable extent.psnackLike o+, but also returns the final scanner state.qsnackEfficiently consume as long as the input characters match the predicate. An inverse of s.rsnackLike q+, but requires at least a single character.ssnackEfficiently consume until a character matching the predicate is found. An inverse of q.tsnackSame as s+, but requires at least a single character.usnackAccepts optional '+' or '-'? character and then applies it to the following parser result.vsnack1Accepts an integral number in the decimal format.wsnackAccepts an integral number in the hexadecimal format in either case. Does not look for 0x or similar prefixes.xsnack/Accepts an integral number in the octal format.ysnackAccepts a fractional number as a decimal optinally followed by a colon and the fractional part. Does not support exponentiation.8  !"JNVWXYZ[efghijklmnopqrstuvwxy8 JefghikjlNmnop!"qrstuvwxy VWXYZ[       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN+O-P23456789:;Q=>DEFGHIJKL)*,-./012345678?@ABCRSTUVWXYZ[\snack-0.2.0.0-inplaceData.Text.ParserData.ByteString.ParserData.ByteString.Parser.Char8Snack.Combinatorsstring Data.CharisStringbase Control.MonadguardGHC.BasepureunlessControl.Applicativeoptional GHC.UnicodeisSpace Data.FunctorvoidmanyemptywhenParser runParserResultSuccessFailureErrorprovidedchoicecounteitherPoptionmany1manyTillsepBysepBy1wrapinRange notInRangecharnotChar parseOnlyanyCharsatisfyspace skipSpacepeekCharstringCItakescan runScanner takeWhile takeWhile1takeTill takeTill1matchlabelextenttakeText endOfInputatEndsigneddecimal hexadecimaloctal fractional$fFunctorResult$fMonadFailParser$fMonadPlusParser $fMonadParser$fAlternativeParser$fApplicativeParser$fFunctorParser $fEqResult $fShowResultbytenotByteanyBytepeekBytetakeByteStringtext-2.0-8e05fa0a5e8f56ab5ca7376ad83c287861e69b8fd16489a353b2b27ca6fc5f91Data.Text.InternalTextControl.Monad.Failfail GHC.MaybeNothingbytestring-0.11.1.0Data.ByteString.Internal ByteString toCaseFold