!"#$%&'()*+,-./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>89VDoc is the abstract data type respresenting multi-line  documents. 7Multi-line documents have a limited set of operations 8 (basically concatenation with or without a blank line = inbetween) compared to single line docs which support e.g.  padding and truncating. 9Doc is the abstract data type respresenting single line  documents. ;JoinPrint ditinguishes between single-line and multi-line < documents. Single-line, horizontal documents support some 8 operations not multi-line documents, e.g. padding, see ,  and - and truncating . and /. 'Create an empty, zero length document. Test if the doc is empty. Get the length of the Doc.  Length is cached in the document's data type so this  operation is O(1). 6Horizontally concatenate two documents with no space  between them. <Horizontally concatenate two documents with a single space  between them. 2Horizontally concatenate a list of documents with (<>). 2Horizontally concatenate a list of documents with (<+>). 9Vertically concatenate a list of documents, one doc per  line.  Note - this function produces a  rather than a . 9Vertically concatenate a list of documents, one doc per # line with a blank line inbetween.  Note - this function produces a  rather than a .  Prefix the  to the start of the .  Suffix the  with the . Concatenate a list of . Concatenate a list of  with a blank line separating  them. )Create a document from a literal string. <The string should not contain tabs or newlines (though this 8 is not enforced). To allow padding and truncating the  horizontal width of a  is cached in the datatype, 6 building a Doc containing tabs or newlines leads to  unspecified behaviour. ,Create a document from a literal character. -The char should not be a tab or newline. See  for the  rational. Show the Int as a Doc.  int = text . show Show the Integer as a Doc. Show an "integral value" as a Doc via . Show the Float as a Doc. Show the Double as a Doc. 2Create a Doc containing a single space character. 0Create a Doc containing a two-space characters. !Create a Doc containing a comma, ",". &Create a Doc containing a semi colon, ";". =Punctuate the Doc list with the separator, producing a Doc. ,Enclose the final Doc within the first two. +There are no spaces between the documents:  enclose l r d = l <> d <> r &Enclose the Doc within single quotes. &Enclose the Doc within double quotes. Enclose the Doc within parens (). 'Enclose the Doc within square brackets []. $Enclose the Doc within curly braces {}. !&Enclose the Doc within angle brackets <>. "&Create a Doc containing a left paren, '('. #'Create a Doc containing a right paren, ')'. $/Create a Doc containing a left square bracket, '['. %0Create a Doc containing a right square bracket, ']'. &,Create a Doc containing a left curly brace, '{'. '-Create a Doc containing a right curly brace, '}'. (.Create a Doc containing a left angle bracket, '<'. )/Create a Doc containing a right angle bracket, '>'. ** :  n * ch -> Doc Repeat the supplied char (ch), n times. +,Create a list of space characters of length n. ,, :  width * ch * doc -> Doc  Pad the supplied Doc to fit width using the char ch. > Padding is performed at the left, right-justifying the Doc. @If the doc is already wider than supplied width it is returned $ as-is (no truncation takes place). -- :  width * ch * doc -> Doc  Pad the supplied Doc to fit width using the char ch. > Padding is performed at the right, left-justifying the Doc. ?If the doc is already wider than supplied width it is returned $ as-is (no truncation takes place). .. : width * doc -> Doc Truncate a doc to the supplied width. Characters are dropped < from the left until the document fits. If the document is ; shorter than the supplied width it is returned as is (no  padding takes place). // : width * doc -> Doc Truncate a doc to the supplied width. Characters are dropped = from the right until the document fits. If the document is ; shorter than the supplied width it is returned as is (no  padding takes place). 09Rendering the Doc to a String. This is the same as using . 1Print the Doc.  renderIO = putStrLn . render 2  !"#$%&'()*+,-./012  !"#$%&'()*+,-./01 to be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>22 : i -> Doc Print i# as hexadecimal, no zero padding. 7Negative numbers are printed as a string of asterisks. 3'Print a Word8 as a 2-digit hex number. 4(Print a Word16 as a 4-digit hex number. 5(Print a Word32 as a 8-digit hex number. 66 : 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. 74Print a Word8 as a 2-digit hex number prefixed with "0x". 85Print a Word16 as a 4-digit hex number prefixed with "0x". 95Print a Word32 as a 8-digit hex number prefixed with "0x". :; 23456789:; 23456789:;to be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com><  !"#$%&'()*+,-./0123456789:;<  !"#$%&'()*+,-./0123456789;: 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. <==, - 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. >?@<=>?@<=@?>>?@ 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>/6Kangaroo 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). A=Primitive monadic run function - other modules should export 3 type specific specializations of this function...  !"#$%&'()B+Lift an IO action into the Kangaroo monad. CReport a parse error. :Source position is appended to the supplied error message DD :  parser * error_msg -> parser D 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. EParse a single byte. 9If the cursor is beyond the end of the current region a  parse-error is thrown with C. FF :  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  C. GG :  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. H%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. II :  num_bytes -> ()  ?Move the cursor forward by the supplied distance. The distance 3 must be positive, negative distances are ignored. I/ performs no range checking. If the cursor is < moved beyond the region boundary then the next parse will  fail. JJ : -> cursor-position #Return the current cursor position KK : .-> (region-start, cursor-position, region-end) =Return the current parse region and the current position of  the cursor within it. LL3 - is the cursor at the end of the current region? MM : -> distance-to-region-end <Distance from the current cursor position to the end of the  current region NN : -> region-length Size of the current region. OO : 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. O' 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. PP : 1name * coda * abs_region_start * parser -> parser A variation of O! - the new region starts at the  supplied abs_region_start" and continues to the end of the  current region. P4 throws a parse error if the new start position is  not within the current region. QQ : )name * coda * distance * parser -> parser A variation of P" - the start of the new region is  calculated from the current-cursor-position + the supplied  distance. Q( throws a parse error if the new start , position is not within the current region. RR : * name * coda * distance * parser -> parser A variation of O - 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. R4 throws a parse error if the right-boundary of the / new region extends beyond the current region. SS : 3region-name * coda * abs-end-pos * parser -> parser A variantion of R% - 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. S throws a parse error if the  abs-end-pos ; extends beyond the right-boundary of the current region. TUV!<=>?@A$%&BCDEFGHIJKLMNOPQRSTUVA$%&BCDEFGHIJKLMNOPQRSTUVto be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com> WXYZ[\]^_`<Apply parse then apply the check, if the check fails report  the error message. a<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. b WXYZ[\]^_`ab WXYZ[\]^_`abto be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>c>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 C. d=Parse any single character. The parser consumes one byte and  uses * to convert it. e&Parse a string of the supplied length n. If n4 is less than or equal to zero the empty string is  returned. f<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 C. g(Parse a null-terminated C-style string. hParse the literal 0x00. iGet n bytes. If n: is less than or equal to zero an empty list is returned. j.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) k#Parse a Word16 in big endian form. lParse a "Word24" in big endian form. 73 bytes are read - the answer is returned as a Word32. m#Parse a Word32 in big endian form. n#Parse a Word64 in big endian form. o&Parse a Word16 in little endian form. pParse a "Word24" in little endian form. 73 bytes are read - the answer is returned as a Word32. q&Parse a Word32 in little endian form. r#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 . s#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 . t&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 . u&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 . v-Parse an 4-byte IEEE single precision float. "NOTE - THIS FUNCTION IS UNTESTED! cdefghijklmnopqrstuvcdefghijklmnopqrstuvto be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>wxyzRetrieve the environment. {|1Execute a computation in a modified environment. A<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|Awxyz{|A=@?><BCDEFGHIJKLMNOPQRSTUVWXYZ[]\^_`abcdefghijklmnopqrstuvwxyz{|to be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>}+,-~Retrieve the environment. 1Execute a computation in a modified environment. H<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuv}~H}~A=@?><BCDEFGHIJKLMNOPQRSTUVWXYZ[]\^_`abcdefghijklmnopqrstuv }~to be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com> D<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvDA=@?><BCDEFGHIJKLMNOPQRSTUVWXYZ[]\^_`abcdefghijklmnopqrstuv to be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>?<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuv?A=@?><BCDEFGHIJKLMNOPQRSTUVWXYZ[]\^_`abcdefghijklmnopqrstuvto be determined.highly unstable)Stephen Tetley <stephen.tetley@gmail.com>><=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuv>A=@?><BCDEFGHIJKLMNOPQRSTUVWXYZ[]\^_`abcdefghijklmnopqrstuv. !"#$%&'()*+,-./0123456789:;<=>?@AB C D E F G H I J K L M N O P QRSTUVWXYZ[\]^_`abcdefghijklmnopqrs!t uvwxyz{|}~              D E F      kangaroo-0.4.0Text.PrettyPrint.JoinPrint%Data.ParserCombinators.KangarooReader"Data.ParserCombinators.KangarooRWS$Data.ParserCombinators.KangarooState%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.PrimVDocDocemptynulllength<><+>hcathsepvcatvsepvconsvsnocvconcat vconcatSeptextcharintintegerintegralfloatdoublesglspacedblspacecomma semicolon punctuateenclosesquotesdquotesparensbracketsbracesangleslparenrparenlbracketrbracketlbracerbracelanglerangle replicateCharspacerpadlpadrtruncltruncrrenderrenderIOhexhex2hex4hex8oxhexoxhex2oxhex4oxhex8hexdumpAhexdump RegionName RegionCodaAlfine AlfermataDalpuntoParseErr liftIOAction reportError substErrorword8satisfy checkWord8optskippositionregionatEndlengthRemaining regionSize intraparseadvanceadvanceRelativerestrict restrictToPos printHexAll printHexRangeprintRegionStackmanyTillgenericManyTill manyTillPCgenericManyTillPCcount genericCount countPrefixedrunOn genericRunOn postCheck buildWhilebuildPrimitiveanyCharstringcstringw8ZerogetBytesint8word16beword24beword32beword64beword16leword24leword32leint16beint32beint16leint32le ieeeFloatSPKangarooparse runKangarooaskaskslocal evalKangaroo execKangarooputgetmodifygetstell JoinStringTreeLeafEmptyconssnoccons1++toStringfoldrfoldltakeLeft takeRightltrdropLeft dropRightoogetVDocgetDocbaseGHC.Real fromIntegralGHC.ShowshowrenderSrenderVLineNumWidthasterix lineSpanshexdump2 sizeHexStraZipWithhexLine columnPad lineNumberslineEnd lineStart segment16Ixs segment16spanArr printable debugHexAll debugHexRange 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 mantWords GenKangaroogetGenKangarooEnvSt ImageDatafmapKangreturnIObindIO returnKangbindKangrunGenKangaroothrowErraskEnvgetStputStgetPosgetEndgetStart getUserSt putUserSt modifyUserSt advancePos1 bracketRegionGHC.Basechrvaluesstate3env3