úÎ#›ñ˜1?      !"#$%&'()*+,-./0123456789:;<=> (c) 2020 compMITonecomputer00@gmail.comstableportableSafe=? Verrata4A class for manipulating and converting source text.For  ByteStringc source types, you should convert it to one of the built-in instances with your encoding of choice.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.comstableportableSafe@V$errata8Stylization options for a block, e.g. characters to use.errata:Shows the location of a block at a file, line, and column. errataShows the line number nJ for a source line. The result should visually be the same length as just show n. errataStylize a source line.°Column pointers of the text that are being underlined are given for highlighting purposes. The result of this should visually take up the same space as the original line. errata‡The text to use as an ellipsis in the position of line numbers for when lines are omitted. This should visually be one character. errata#The prefix before the source lines. errataVThe text to underline a character in a pointer. This should visually be one character.erratabThe text to use as a vertical bar when connecting pointers. This should visually be one character.erratadThe text to use as a horizontal bar when connecting pointers. This should visually be one character.errata~The 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 connector upwards and rightwards when connecting pointers. This should visually be one character.errataˆThe text to use as a connector upwards, downwards, and rightwards when connecting pointers. This should visually be one character.errataqA 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.PA pointer may also be connected to all the other pointers within the same block.errataThe line of the pointer.errata#The starting column of the pointer.errata!The ending column of the pointer.errata2Whether this pointer connects with other pointers.errata"An optional label for the pointer.errataLInformation about a block in the source code, such as pointers and messages.*Each block has a style associated with it.errataThe style of the block.errata>The filepath, line, and column of the block. These start at 1.YThis is used for sorting errors, as well as to create the text that details the location.errataaThe header message for the block. This will appear below the location and above the source lines.errata[The 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. errataHThe body message for the block. This will appear below the source lines.!errata9A collection of information for pretty printing an error.#errata.The message that appears above all the blocks.$errata<The main error block, which will be used for sorting errors.%errataMExtra blocks in the source code to display. Blocks themselves are not sorted.&errata.The message that appears below all the blocks.'errata.Label text. Generally goes inline with things.(errata'Body text. Generally goes below things.)errata)Header text. Generally goes above things.*errataColumn number, starts at 1.+errataLine number, starts at 1.,errataGets the column span for a .-errataXAdds highlighting to spans of text by enclosing it with some text e.g ANSI escape codes.-errataText to add before.errataText to add after.errataQIndices to enclose. These are column spans, starting at 1. They must not overlap.errataText to highlight.(  !"#$%&'()*+,-(+*)('!"#$%& , - (c) 2020 compMITonecomputer00@gmail.comstableportableNone"#`K .errataRenders errors./errata5A single pretty error from metadata and source lines.0errata7A single pretty block from block data and source lines.1errataThe source lines for a block.?errata-Makes a line of decorations below the source.@errata/Paramorphism on lists (lazily, from the right).AerrataPuts text between each item.BerrataReplicates text into a builder.CerrataIndex safely into an array.?errata3Catch up from the previous pointer to this pointer.errataSomething in the middle.errataReach the next pointer../01./01 (c) 2020 compMITonecomputer00@gmail.comstableportableNone–½ 2errataPCreates a simple error that has a single block, with an optional header or body.3errata`A simple block that points to only one line and optionally has a label, header, or body message.4errata A variant of 3 that only points at one column.5errataTA block that points to two parts of the source that are visually connected together.6errata A variant of 5- where the pointers point at only one column.7errataTA 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.8errata A variant of 7- where the pointers point at only one column.9errata*A basic style using only ASCII characters.Errors should look like so: ÿ[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 6 | | line 6 7 | | line 7 baz end | |______^_____^^^ end label | | | | inner label block body message error body message:errata'A fancy style using Unicode characters.Errors should look like so: ÿYerror 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 6 % % line 6 7 % % line 7 baz end % %%%%%%%^%%%%%^^^ end label % % % % inner label block body message error body message;errataCA fancy style using Unicode characters and ANSI colors, similar to :. Most things are colored red.<errataCA fancy style using Unicode characters and ANSI colors, similar to :!. Most things are colored yellow.=errata?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.List.NonEmpty as N import qualified Data.Text as T import qualified Data.Text.Lazy.IO as TL import Errata toErrata :: ParseError -> !8 toErrata (ParseError fp l c unexpected expected) = 2- (Just "an error occured!") (3 9ÿ4 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 $ = source (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, [, {>errata A variant of =I for non-empty lists. You can ensure the output is never an empty string.2errata The header.errata The block.errata The body.3errataThe style of the pointer.errata The filepath.errataThe header message.errata<The line number and column span, starting at 1, and a label.errataThe body message.4errataThe style of the pointer.errata The filepath.errataThe header message.errata7The line number and column, starting at 1, and a label.errataThe body message.5errataThe style of the pointer.errata The filepath.errataThe header message.errataBThe first line number and column span, starting at 1, and a label.errataCThe second line number and column span, starting at 1, and a label.errataThe body message.6errataThe 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.errataThe body message.7errataThe style of the pointer.errata The filepath.errataThe header message.errataBThe first line number and column span, starting at 1, and a label.errataCThe 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.8errataThe 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..  !"#$%&23456789:;<=>.!"#$%&2 345678 9:;<=>D      !!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHerrata-0.2.0.0-inplace Errata.Source Errata.TypesErrata.Internal.RenderErrata Data.TextTextData.Text.LazypackSource sourceToLines sourceToText $fSourceText $fSourceText0 $fSource[]Style styleLocation styleNumber styleLine styleEllipsisstyleLinePrefixstyleUnderline styleVerticalstyleHorizontalstyleDownRight styleUpRightstyleUpDownRightPointer pointerLinepointerColStart pointerColEndpointerConnect pointerLabelBlock blockStyle blockLocation blockHeader blockPointers blockBody errataHeader errataBlock errataBlocks errataBodyLabelBodyHeaderColumnLinepointerColumns highlight renderErrors renderErrata renderBlockrenderSourceLines errataSimple blockSimple blockSimple'blockConnectedblockConnected' blockMerged blockMerged' basicStyle fancyStyle fancyRedStylefancyYellowStyle prettyErrorsprettyErrorsNEfoldDecorationspararunsplit replicateB indexLines