Copyright | (c) 2020 comp |
---|---|
License | MIT |
Maintainer | onecomputer00@gmail.com |
Stability | stable |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Type definitions. Most of these are re-exported in Errata, so you should not need to import this module, unless you need some of the helper functions for making new functionality on top of Errata.
Synopsis
- type Line = Int
- type Column = Int
- type Header = Text
- type Body = Text
- type Label = Text
- data Errata = Errata {
- errataHeader :: Maybe Header
- errataBlocks :: [Block]
- errataBody :: Maybe Body
- data Block = Block {
- blockStyle :: Style
- blockLocation :: (FilePath, Line, Column)
- blockHeader :: Maybe Header
- blockPointers :: [Pointer]
- blockBody :: Maybe Body
- data Pointer = Pointer {}
- pointerColumns :: Pointer -> (Column, Column)
- data Style = Style {
- styleLocation :: (FilePath, Line, Column) -> Text
- styleNumber :: Line -> Text
- styleLine :: [(Column, Column)] -> Text -> Text
- styleEllipsis :: Text
- styleLinePrefix :: Text
- styleUnderline :: Text
- styleVertical :: Text
- styleHorizontal :: Text
- styleDownRight :: Text
- styleUpRight :: Text
- styleUpDownRight :: Text
- highlight :: Text -> Text -> [(Column, Column)] -> Text -> Text
Type synonyms
Error format data
A collection of information for pretty printing an error.
Errata | |
|
Blocks and pointers
Information about a block in the source code, such as pointers and messages.
Each block has a style associated with it.
Block | |
|
A pointer is the span of the source code at a line, from one column to another. Each of the positions start at 1.
A 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.
Pointer | |
|
Styling options
Stylization options for a block, e.g. characters to use.
Style | |
|