Copyright | (c) 2020- comp |
---|---|
License | MIT |
Maintainer | onecomputer00@gmail.com |
Stability | stable |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Premade styles for blocks and pointers.
Synopsis
- basicStyle :: Style
- basicPointer :: PointerStyle
- fancyStyle :: Style
- fancyPointer :: PointerStyle
- fancyRedStyle :: Style
- fancyRedPointer :: PointerStyle
- fancyYellowStyle :: Style
- fancyYellowPointer :: PointerStyle
- highlight :: [(PointerStyle, (Column, Column))] -> Text -> Text
Documentation
basicStyle :: Style Source #
A basic style using only ASCII characters.
Errors should look like so (with basicPointer
):
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 message
basicPointer :: PointerStyle Source #
Pointers using only ASCII characters.
fancyStyle :: Style Source #
A fancy style using Unicode characters.
Errors should look like so (with fancyPointer
):
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
fancyPointer :: PointerStyle Source #
Pointers using Unicode characters and ANSI colors.
fancyRedStyle :: Style Source #
A fancy style using Unicode characters and ANSI colors, similar to fancyStyle
. Most things are colored red.
fancyRedPointer :: PointerStyle Source #
Red pointers using Unicode characters and ANSI colors.
fancyYellowStyle :: Style Source #
A fancy style using Unicode characters and ANSI colors, similar to fancyStyle
. Most things are colored yellow.
fancyYellowPointer :: PointerStyle Source #
Yellow pointers using Unicode characters and ANSI colors.