Copyright | (c) 2020 comp |
---|---|
License | MIT |
Maintainer | onecomputer00@gmail.com |
Stability | stable |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Functions for rendering the errors. You should not need to import this, as these functions are lower-level.
This module is internal, and may break across non-breaking versions.
Synopsis
- renderErrors :: Source source => source -> [Errata] -> Builder
- renderErrata :: Source source => IntMap [source] -> Errata -> [IntMap [Pointer]] -> [Line] -> [Line] -> Builder
- renderBlock :: Source source => IntMap [source] -> Block -> IntMap [Pointer] -> (Line, Line) -> Builder
- renderSourceLines :: forall source. Source source => [(Line, source)] -> Block -> Int -> IntMap [Pointer] -> Maybe Builder
- groupBlockPointers :: Block -> IntMap [Pointer]
- slices :: Monoid a => [a] -> [[a]]
- makeSourceTable :: Monoid a => Line -> Line -> [a] -> IntMap [a]
Documentation
renderErrors :: Source source => source -> [Errata] -> Builder Source #
Renders a collection of Errata
.
:: Source source | |
=> IntMap [source] | The source table. |
-> Errata | The |
-> [IntMap [Pointer]] | The pointers of each block grouped by line. |
-> [Line] | The mininum line of each block. |
-> [Line] | The maxinum line of each block. |
-> Builder |
Renders a single Errata
.
:: Source source | |
=> IntMap [source] | The source table. |
-> Block | The block to render. |
-> IntMap [Pointer] | The pointers of this block grouped by line. |
-> (Line, Line) | The mininum and maximum lines of this block. |
-> Builder |
Renders a single block.
:: forall source. Source source | |
=> [(Line, source)] | The source lines, from the minimum line to the maximum line for the block. |
-> Block | The block to render. |
-> Int | The length of the actual number of the maximum line. |
-> IntMap [Pointer] | The pointers of this block grouped by line. |
-> Maybe Builder |
Renders the source lines for a block.
groupBlockPointers :: Block -> IntMap [Pointer] Source #
Group the pointers of a block by the line they appear on.