JK      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~to be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>!Build a JoinString from a string :Character cons (potentially) efficient if the join string  is a leaf. =Concatenate two join strings. Unlike (++) on regular lists, @ concatenation on join strings is (relatively) cheap hence the  name  join list. (Right-associative fold of a JoinString. 'Left-associative fold of a JoinString.  flattens the join-string.  flattens the join-string. to be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>-length on a Doc is O(1).   !"#$%&'();Rendering is simple because there is no notion of fitting. *+  !"#$%&'()*+  !"#$%&'()* to be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>++ : i -> Doc Print i# as hexadecimal, no zero padding. 7Negative numbers are printed as a string of asterisks. ,-.// : pad-length * i -> Doc Print i in hexadecimal, padding with '0' to the supplied   pad-length and prefixing with "0x". 7Negative numbers are printed as a string of asterisks. 0123 +,-./0123 +,-./0123to be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>4  !"#$%&'()*+,-./01234  !"#$%&'()*+,-./0123 to be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com> to be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>$/ is a non empty list of RegionInfo structures. . contains the (inclusive) bounds of a region  and the ' coda action'% to take after parsing has finished. 455, - represents three useful final positions:  dalpunto - 'from the point' ? - Run the parser within a region and return to where you came  from.  alfermata - ' to the stop' @ - Run the parser within a region, the cursor remains wherever  the parse finished.  alfine - ' to the end' @ - Run the parser within a region and jump to the right-end of  the region after the parse. 6784567845876678 to be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>applicative cons 6Compose an arity 1 function with an arity 2 function.  B1 - blackbird 6Compose an arity 1 function with an arity 3 function.  B2 - bunting 6Compose an arity 1 function with an arity 4 function.  to be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>  to be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>-96Kangaroo is not a transformer as IO is always at the  'bottom'5 of the effect stack. Like the original Parsec it is / parametric on user state (refered to as ust). :;=Primitive monadic run function - other modules should export 3 type specific specializations of this function... <  =>?   @+Lift an IO action into the Kangaroo monad. AReport a parse error. :Source position is appended to the supplied error message BB :  parser * error_msg -> parser B is equivalent to Parsec's <?> combinator. ;Run the supplied parser, if the parse succeeds return the < result, otherwise override the original error message with  the supplied  error_msg. CParse a single byte. 9If the cursor is beyond the end of the current region a  parse-error is thrown with A. DD :  predicate -> parser  6Parse a single byte and apply the predicate to it. On True  return the parsed byte, on False throw a parse-error with  A. EE :  predicate -> opt parser  4Byte parser with backtracking when the match fails. >Parse a single byte and apply the predicate to the result. On  success return  (Just answer), on failure move the cursor  position back one and return Nothing. F%Backtracking parser similar to Parsec's try. 7Try the supplied parser, if the parse succeeds with no  parse-errors return  (Just answer). If a parse-error is > generated, discard the parse-error, return the cursor to the  initial position and return Nothing. GG : -> cursor-position #Return the current cursor position HH : .-> (region-start, cursor-position, region-end) =Return the current parse region and the current position of  the cursor within it. II3 - is the cursor at the end of the current region? JJ : -> distance-to-region-end <Distance from the current cursor position to the end of the  current region KK : -> region-length Size of the current region. LL : Aname * coda * abs_region_start * region_length * parser -> parser 8Create a new region within the current one and run the = supplied parser. The cursor position is moved to the start ! of the new region. The value of coda determines where the 1 cursor is positioned after a successful parse. L' throws a parse error if the supplied A absolute-region-start is not located within the current region, - or if the right-boundary of the new region  ( abs_region_start + region_length) extends beyond the ' right-boundary of the current region. MM : 1name * coda * abs_region_start * parser -> parser A variation of L! - the new region starts at the  supplied abs_region_start" and continues to the end of the  current region. M4 throws a parse error if the new start position is  not within the current region. NN : )name * coda * distance * parser -> parser A variation of M" - the start of the new region is  calculated from the current-cursor-position + the supplied  distance. N( throws a parse error if the new start , position is not within the current region. OO : * name * coda * distance * parser -> parser A variation of L - create a new region as a > restriction of the current one and run the supplied parser. = The new region starts at the current coursor position, the % right-boundary is restricted to the current-cursor-position  + the supplied distance. O4 throws a parse error if the right-boundary of the / new region extends beyond the current region. PP : 3region-name * coda * abs-end-pos * parser -> parser A variantion of O% - the new region takes the current 9 cursor position for the left-boundary and the supplied  absolute-end-position ( abs-end-pos) as the right-boundary. P throws a parse error if the  abs-end-pos ; extends beyond the right-boundary of the current region. QR456789:;<=>?@ABCDEFGHIJKLMNOPQR9:;<=>?@ABCDEFGHIJKLMNOPQRto be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com> STUVWXYZ[\<Apply parse then apply the check, if the check fails report  the error message. ]<Build a value by while the test holds. When the test fails 5 the position is not backtracked, instead we use the "failing"  element with lastOp' potentially still building the value  with it. ^ STUVWXYZ[\]^ STUVWXYZ[\]^to be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>_>Attempt to parse the supplied single character (the supplied ) char must be in the ASCII range 0-255). ?If the parse succeeds return the char, otherwise a parse-error  will be thrown with A. `=Parse any single character. The parser consumes one byte and  uses  to convert it. a&Parse a string of the supplied length n. If n4 is less than or equal to zero the empty string is  returned. b<Parse the supplied string. All characters should be within  the range 0-255. ?If the parse succeeds return the char, otherwise a parse-error  will be thrown with A. c(Parse a null-terminated C-style string. dParse the literal 0x00. eGet n bytes. If n: is less than or equal to zero an empty list is returned. f.Parse a single byte, returning it as an Int8. @The conversion from a byte (0-255) to an Int8 uses the Prelude  function . !The conversion is summarized as:  0..127 = 0..127  128 = -128  129 = -127  130 = -126  ...  254 = -2  255 = -1   wtoi :: Word8 -> Int8  wtoi i | i < 128 = i , | otherwise = -128 + (clearBit i 7) g#Parse a Word16 in big endian form. hParse a "Word24" in big endian form. 73 bytes are read - the answer is returned as a Word32. i#Parse a Word32 in big endian form. j#Parse a Word64 in big endian form. k&Parse a Word16 in little endian form. lParse a "Word24" in little endian form. 73 bytes are read - the answer is returned as a Word32. m&Parse a Word32 in little endian form. n#Parse an Int16 in big endian form. >The ans is parsed as a Word16 (big endian) then converted to % an Int16 using the Prelude function . o#Parse an Int32 in big endian form. >The ans is parsed as a Word32 (big endian) then converted to % an Int32 using the Prelude function . p&Parse an Int16 in little endian form. >The ans is parsed as a Word16 (little endian) then converted ( to an Int16 using the Prelude function . q&Parse an Int32 in little endian form. >The ans is parsed as a Word32 (little endian) then converted ( to an Int32 using the Prelude function . r-Parse an 4-byte IEEE single precision float. "NOTE - THIS FUNCTION IS UNTESTED! _`abcdefghijklmnopqr_`abcdefghijklmnopqrto be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>stuv=45678:@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuv=stuv:58764@ABCDEFGHIJKLMNOPQRSTUVWYXZ[\]^_`abcdefghijklmnopqrstuvto be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>wxyz{|}~D45678:@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrwxyz{|}~Dwxyz{|}~:58764@ABCDEFGHIJKLMNOPQRSTUVWYXZ[\]^_`abcdefghijklmnopqr wxyz{|}~to be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com> H456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrHSTUVWYXZ[\]^9:58764;@<=>?ABCDEFGHIJKLMNOPQR_`abcdefghijklmnopqr to be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>=45678:@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqr=:58764@ABCDEFGHIJKLMNOPQRSTUVWYXZ[\]^_`abcdefghijklmnopqrto be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com><45678:@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqr<:58764@ABCDEFGHIJKLMNOPQRSTUVWYXZ[\]^_`abcdefghijklmnopqr !"#$%&'()*+,-./0123456789:; < = > ? @ A B C D E F G H IJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~             = > ? Jkangaroo-0.3.0Text.PrettyPrint.JoinPrint%Data.ParserCombinators.KangarooReader$Data.ParserCombinators.KangarooState"Data.ParserCombinators.KangarooRWS%Data.ParserCombinators.KangarooWriterData.ParserCombinators.Kangaroo%Text.PrettyPrint.JoinPrint.JoinStringText.PrettyPrint.JoinPrint.Core"Text.PrettyPrint.JoinPrint.HexDump%Data.ParserCombinators.Kangaroo.Debug&Data.ParserCombinators.Kangaroo.Region%Data.ParserCombinators.Kangaroo.Utils)Data.ParserCombinators.Kangaroo.IEEEFloat*Data.ParserCombinators.Kangaroo.ParseMonad+Data.ParserCombinators.Kangaroo.Combinators$Data.ParserCombinators.Kangaroo.PrimDocemptynulllength<><+><%>vcathcathseptextcharintintegerintegralsglspacedblspacecomma semicolon punctuateenclosesquotesdquotesparensbracketsbracesangleslparenrparenlbracketrbracketlbracerbracelanglerangle replicateCharspacerpadlpadrtruncltruncrrenderrenderIOhexhex2hex4hex8oxhexoxhex2oxhex4oxhex8hexdump RegionName RegionCodaAlfine AlfermataDalpunto GenKangarooParseErrrunGenKangaroothrowErr getUserSt putUserSt modifyUserSt liftIOAction reportError substErrorword8satisfy checkWord8optpositionregionatEndlengthRemaining regionSize intraparseadvanceadvanceRelativerestrict restrictToPos printHexAllprintRegionStackmanyTillgenericManyTill manyTillPCgenericManyTillPCcount genericCount countPrefixedrunOn genericRunOn postCheck buildWhilebuildPrimitiveanyCharstringcstringw8ZerogetBytesint8word16beword24beword32beword64beword16leword24leword32leint16beint32beint16leint32le ieeeFloatSPKangarooparse runKangarooask evalKangaroo execKangarooputgetmodifygetstell JoinStringTreeLeafEmptyconssnoccons1++toStringfoldrfoldltakeLeft takeRightltrdropLeft dropRightoogetDocLineNumWidthasterixaZipWithhexLine columnPad lineNumbers segment16 printable slowHexAll RegionErrorgetRegionError ParseStackPnP0 RegionInforegion_start_inclregion_end_incl region_coda region_namePos RegionEnd RegionStartmapTop modifyPos validBoundsinfos regionErrormkMsg regionStart regionEndnewStack newRegionpushpopmove1movelocationprintParseStack<:>pairA mprogressbracketM bracketM_unfoldrMooooooow16lew24lew32lei16lei32lei16bei32bew16bew32bew64beshiftL8shiftL16shiftL24shiftL32shiftL40shiftL48shiftL56const_BprintBintoAndFrounpackIEEESingle exponent'iPowfractionpackIEEESingle findPosExpoexpand expoWords mantWordsgetGenKangarooEnvSt ImageDatafmapKangreturnIObindIO returnKangbindKangaskEnvgetStputStgetPosgetEndgetStart advancePos1 bracketRegionbaseGHC.BasechrGHC.Real fromIntegralvaluesstate3env3