h,?@ABCDEFGHIJKLMNOPQRSTUVWX0.4.0.2(c) 2020- compMITonecomputer00@gmail.comstableportable Safe-Inferred"errata4A class for manipulating and converting source text.For  ByteString source types, you should convert it to one of the built-in instances with your encoding of choice.errataThe empty source, used when a pointer references an out-of-bounds line.errataSplits the source into lines.errataConverts the source text to  (strict). The given source text is a single line of the source.(c) 2020- compMITonecomputer00@gmail.comstableportable Safe-Inferred"%&Q0errataStylization options for an individual pointer, e.g. characters to use. errataWhether to use the hook for labels that drop down, or simply start the label directly under the connector. errataThe text to use as a vertical bar when connecting a pointer that drops down to its label.&This should visually be one character. errataThe text to use as a connector upwards and hooking to the right for the label of a pointer that drops down.*This probably looks best as one character. errata/The text to underline a character in a pointer.&This should visually be one character. errata2Stylize the text that this pointer is underlining.This is only used if 1 uses the given pointer styles, for example with  . The result of this should visually take up the same space as the original text.errata8Stylization options for a block, e.g. characters to use.errata"Whether to enable the line prefix.errata3Whether to enable decorations at all in this block.,This includes the pointer connectors (as in :) and the underlines, connectors, and labels (as in /). However, highlighting will still be applied.errata9Whether to add a padding line after the last source line.errata;Whether to add a padding line before the first source line.errataMaximum number of extra lines that can be added before the second line when skipping lines between two lines.errataMaximum number of extra lines that can be added after the first line when skipping lines between two lines.errata6The number of spaces a tab character is equivalent to.:Your source will have tabs replaced with this many spaces.errataThe text to use as a connector upwards, downwards, and rightwards when connecting pointers.&This should visually be one character.errataThe text to use as a connector upwards and rightwards when connecting pointers.&This should visually be one character.errataThe text to use as a connector downwards and rightwards when connecting pointers.&This should visually be one character.errata=The text to use as a horizontal bar when connecting pointers.&This should visually be one character.errata;The text to use as a vertical bar when connecting pointers.&This should visually be one character.errata#The prefix before the source lines.?Before it may be the line number, and after it the source line.errataThe text to use as an ellipsis in the position of line numbers for when lines are omitted.&This should visually be one character.errataStylize a source line.The style and the column span (sorted, starting at 1) of the text that is being underlined are given for highlighting purposes (see  ). They can be ignored for source code highlighting instead, for example. The result of this should visually take up the same space as the original line.errataShows the line number n for a source line.6The result should visually be the same length as just show n. errata:Shows the location of a block at a file, line, and column.8This is put on its own line just above the source lines.!errataA pointer is the span of the source code at a line, from one column to another. Each of the positions start at 1.9A pointer may also have a label that will display inline.A pointer may also be connected to all the other pointers within the same block.#errataA style for this pointer.$errata"An optional label for the pointer.%errata2Whether this pointer connects with other pointers.&errata!The ending column of the pointer.'errata#The starting column of the pointer.(errataThe line of the pointer.)errataInformation about a block in the source code, such as pointers and messages.*Each block has a style associated with it.+errataThe body message for the block.(This will appear below the source lines.,errataThe block's pointers. These are used to "point out" parts of the source code in this block.The locations of each of these pointers must be non-overlapping. If the pointers are touching at a boundary however, that is allowed.-errata!The header message for the block.?This will appear below the location and above the source lines..errata>The filepath, line, and column of the block. These start at 1.:This is used to create the text that details the location./errataThe style of the block.0errata9A collection of information for pretty printing an error.2errata.The message that appears below all the blocks.3errata%Blocks in the source code to display.4errata.The message that appears above all the blocks.5errata.Label text. Generally goes inline with things.6errata'Body text. Generally goes below things.7errata)Header text. Generally goes above things.8errata-Column number, starts at 1, increments every Y.9errata>Line number, starts at 1, increments every new line character.:errataGets the column span for a !.;errata*Gets physical information about a pointer.5:;)*+-.,/6801324759!"&'%$(#  59876501432)*/.-,+!"('&%$#:;  (c) 2020- compMITonecomputer00@gmail.comstableportable Safe-Inferred" Aerrata*A basic style using only ASCII characters.!Errors should look like so (with B): error header message --> file.ext:1:16 block header message | 1 | line 1 foo bar do | ________________^^ start label 2 | | line 2 | | ^ unconnected label 3 | | line 3 | |______^ middle label 4 | | line 4 5 | | line 5 . | | 7 | | line 7 8 | | line 8 baz end | |______^_____^^^ end label | | | | inner label block body message error body messageBerrata%Pointers using only ASCII characters.Cerrata'A fancy style using Unicode characters.!Errors should look like so (with D): error header message C file.ext:1:16 block header message J 1 J line 1 foo bar do J JJJJJJJJJJJJJJJJJ^^ start label 2 J J line 2 J J ^ unconnected label 3 J J line 3 J JJJJJJJ^ middle label 4 J J line 4 5 J J line 5 . J J 7 J J line 7 8 J J line 8 baz end J JJJJJJJ^JJJJJ^^^ end label J J J J inner labelDerrata2Pointers using Unicode characters and ANSI colors.EerrataA fancy style using Unicode characters and ANSI colors, similar to C. Most things are colored red.Ferrata6Red pointers using Unicode characters and ANSI colors.GerrataA fancy style using Unicode characters and ANSI colors, similar to C!. Most things are colored yellow.Herrata9Yellow pointers using Unicode characters and ANSI colors.IerrataAdds highlighting to spans of text by modifying it with the given styles' highlights.IerrataStyles and columns to work on. These are sorted, starting at 1. They must not overlap.errataText to highlight. BADFECHGI ABCDEFGHI(c) 2020- compMITonecomputer00@gmail.comstableportable Safe-Inferred "%&'()JerrataRenders a collection of 0.Kerrata9Group the pointers of a block by the line they appear on.LerrataCreate a source table from the given line span and source lines.MerrataTurns a list into a list of tail slices of the original list, with each element at index i dropping the first i. elements of the original list and tailing an .This allows for correct behavior on out-of-source-bounds pointers.NerrataRenders a single 0.OerrataRenders a single block.Perrata%Renders the source lines for a block.Zerrata-Makes a line of decorations below the source.[errata0Paramorphism on lists (strictly, from the left).\errataCompares length of two lists without traversing them completely.]errataPuts text between each item.^errataReplicates text into a builder._errataReplaces each character in the text with the appropriate instances of the given text based on character width.The result will also be right-padded with the given text to the given length.For tabs, the tab width given is used to make it equivalent to that many spaces.`errataGet the designated render width of a character: 0 for a combining character, 1 for a regular character, 2 for a wide character. (Wide characters are rendered as exactly double width in apps and fonts that support it.)(From Pandoc.)NerrataThe source table.errataThe 0 to render.errata+The pointers of each block grouped by line.errataThe mininum line of each block.errataThe maxinum line of each block.OerrataThe source table.errataThe block to render.errata+The pointers of this block grouped by line.errata,The mininum and maximum lines of this block.PerrataThe source lines, from the minimum line to the maximum line for the block.errataThe block to render.errata4The length of the actual number of the maximum line.errata+The pointers of this block grouped by line.Zerrata3Catch up from the previous pointer to this pointer.&catchUp distance isFirst pointers text' should return text of at least length distance.errata8Add text underneath the pointer before the next pointer.(underlinePointer pointerLen pointer text' should return the text and its length.KLONJPMJNOPKML(c) 2020- compMITonecomputer00@gmail.comstableportable Safe-Inferred9QerrataCreates a simple error that has a single block, with an optional header or body.RerrataA simple block that points to only one line and optionally has a label, header, or body message.Serrata A variant of R that only points at one column.TerrataA block that points to two parts of the source that are visually connected together.Uerrata A variant of T- where the pointers point at only one column.VerrataA block that points to two parts of the source that are visually connected together.If the two parts of the source happen to be on the same line, the pointers are merged into one.Werrata A variant of V- where the pointers point at only one column.Xerrata?Pretty prints errors. The original source is required. Returns  ; (lazy). If the list is empty, an empty string is returned.%Suppose we had an error of this type: data ParseError = ParseError { peFile :: FilePath , peLine :: Int , peCol :: Int , peUnexpected :: T.Text , peExpected :: [T.Text] }3Then we can create a simple pretty printer like so: import qualified Data.Text as T import qualified Data.Text.Lazy.IO as TL import Errata toErrata :: ParseError -> 08 toErrata (ParseError fp l c unexpected expected) = Q- (Just "an error occured!") (R     fp (Just "error: invalid syntax") (l, c, c + T.length unexpected, Just "this one") (Just $ "unexpected " <> unexpected <> "\nexpected " <> T.intercalate ", " expected)) Nothing printErrors :: T.Text -> [ParseError] -> IO () printErrors source es = TL.putStrLn $ X source (map toErrata es) (Note that in the above example, we have OverloadedStrings enabled to reduce uses of  .,An example error message from this might be: an error occured! --> ./comma.json:2:18 error: invalid syntax | 2 | "bad": [1, 2,] | ^ this one unexpected ] expected null, true, false, ", -, digit, [, {Qerrata The header.errata The block.errata The body.RerrataThe style of the block.errataThe style of the pointer.errata The filepath.errataThe header message.errataThe second line number and column, starting at 1, and a label.errataThe body message.VerrataThe style of the block.errataThe style of the pointer.errata The filepath.errataThe header message.errataThe first line number and column span, starting at 1, and a label.errataThe second line number and column span, starting at 1, and a label.errata8The label for when the two pointers are merged into one.errataThe body message.WerrataThe style of the block.errataThe style of the pointer.errata The filepath.errataThe header message.errata=The first line number and column, starting at 1, and a label.errata>The second line number and column, starting at 1, and a label.errata8The label for when the two pointers are merged into one.errataThe body message.6TUVWRSQX)*+-.,/01324!"&'%$(#  601432Q)*/.-,+RSTUVW!"('&%$#  X !"#$%&'()*+,---.-/-0-1-2-3444546474849:;<=>?@ABCDEFGH  IJKLMN OPQRSTUVWXYZ[\]^_`abcdefgerrata-0.4.0.2-inplace Errata.Source Errata.Types Errata.StylesErrata.Internal.RenderErrataerrata Data.TextText highlightData.Text.Lazy basicStyle basicPointerpackSource emptySource sourceToLines sourceToText $fSourceText $fSourceText0 $fSourceList PointerStylestyleEnableHookstyleConnector styleHookstyleUnderlinestyleHighlightStylestyleEnableLinePrefixstyleEnableDecorationsstylePaddingBottomstylePaddingTopstyleExtraLinesBeforestyleExtraLinesAfter styleTabWidthstyleUpDownRight styleUpRightstyleDownRightstyleHorizontal styleVerticalstyleLinePrefix styleEllipsis styleLine styleNumber styleLocationPointer pointerStyle pointerLabelpointerConnect pointerColEndpointerColStart pointerLineBlock blockBody blockPointers blockHeader blockLocation blockStyle errataBody errataBlocks errataHeaderLabelBodyHeaderColumnLinepointerColumns pointerData$fShowPointerStyle $fShowStyle $fShowErrata $fShowBlock $fShowPointer fancyStyle fancyPointer fancyRedStylefancyRedPointerfancyYellowStylefancyYellowPointer renderErrorsgroupBlockPointersmakeSourceTableslices renderErrata renderBlockrenderSourceLines errataSimple blockSimple blockSimple'blockConnectedblockConnected' blockMerged blockMerged' prettyErrorsghc-prim GHC.TypesCharfoldDecorationsparal compareLengthunsplit replicateBreplaceWithWidth charWidth