úÎ!’ų›9      !"#$%&'()*+,-./012345678 (c) 2020 compMITonecomputer00@gmail.comstableportableSafe=? errata4A 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:Ú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.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.errataCThe 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.&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.comstableportableSafe"#`Dä(errataRenders errors.)errata5A single pretty error from metadata and source lines.*errata7A single pretty block from block data and source lines.+errataThe source lines for a block.9errata-Makes a line of decorations below the source.:errata/Paramorphism on lists (lazily, from the right).;errataPuts text between each item.<errataReplicates text into a builder.9errata3Catch up from the previous pointer to this pointer.errataSomething in the middle.errataReach the next pointer.()*+()*+ (c) 2020 compMITonecomputer00@gmail.comstableportableSafeŽ/ ,errataPCreates a simple error that has a single block, with an optional header or body.-errataYA simple block that points to only one line and optionally has a label or a body message..errata A variant of - that only points at one column./errataTA block that points to two parts of the source that are visually connected together.0errata A variant of /- where the pointers point at only one column.1errataTA 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.2errata A variant of 1- where the pointers point at only one column.3errata*A basic style using only ASCII characters.Errors should look like so: ˙Ferror header message --> file.ext:1:16 | 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 message4errata'A fancy style using Unicode characters.Errors should look like so: ˙Derror header message !’ file.ext:1:16 % 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 message5errataCA fancy style using Unicode characters and ANSI colors, similar to 4. Most things are colored red.6errataCA fancy style using Unicode characters and ANSI colors, similar to 4!. Most things are colored yellow.7errata?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: ˙Nimport qualified Data.List.NonEmpty as N import qualified Data.Text as T import qualified Data.Text.Lazy.IO as TL import Errata toErrata :: ParseError -> Errata toErrata (ParseError fp l c unexpected expected) = errataSimple (Just "error: invalid syntax") (blockSimple basicStyle fp l (c, c + T.length unexpected) Nothing (Just $ "unexpected " <> unexpected <> "\nexpected " <> T.intercalate ", " expected)) Nothing printErrors :: T.Text -> [ParseError] -> IO () printErrors source es = TL.putStrLn $ prettyErrors 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: ˜error: invalid syntax --> ./comma.json:2:18 | 2 | "bad": [1, 2,] | ^ unexpected ] expected null, true, false, ", -, digit, [, {8errata A variant of 7I for non-empty lists. You can ensure the output is never an empty string.,errata The header.errata The block.errata The body.-errataThe style of the pointer.errata The filepath.errataThe line number starting at 1.errata"The column span. These start at 1.errata The label.errataThe body message..errataThe style of the pointer.errata The filepath.errataThe line number starting at 1.errata The column number starting at 1.errata The label.errataThe body message./errataThe style of the pointer.errata The filepath.errataIThe first line number and column span, starting at 1, as well as a label.errataJThe second line number and column span, starting at 1, as well as a label.errataThe body message.0errataThe style of the pointer.errata The filepath.errataDThe first line number and column, starting at 1, as well as a label.errataEThe second line number and column, starting at 1, as well as a label.errataThe body message.1errataThe style of the pointer.errata The filepath.errataIThe first line number and column span, starting at 1, as well as a label.errataJThe second line number and column span, starting at 1, as well as a label.errata8The label for when the two pointers are merged into one.errataThe body message.2errataThe style of the pointer.errata The filepath.errataDThe first line number and column, starting at 1, as well as a label.errataEThe second line number and column, starting at 1, as well as a label.errata8The label for when the two pointers are merged into one.errataThe body message.-  !"#$%,-./012345678- !"#$%,-./012 345678=      !!"#$%&'()*+,-./0123456789:;<=>?@A%errata-0.1.0.0-EY8qOeQztZXLCJiT4K0Vab 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 blockPointers blockBody errataHeader errataBlock errataBlocks errataBodypointerColumns highlight renderErrors renderErrata renderBlockrenderSourceLines errataSimple blockSimple blockSimple'blockConnectedblockConnected' blockMerged blockMerged' basicStyle fancyStyle fancyRedStylefancyYellowStyle prettyErrorsprettyErrorsNEfoldDecorationspararunsplit replicateB