Copyright | Copyright (c) 2019-2023 Travis Cardwell |
---|---|
License | MIT |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This library is meant to be imported qualified, as follows:
import qualified HR
Synopsis
- version :: String
- data Parts = Parts {}
- asciiParts :: Parts
- unicodeParts :: Parts
- render :: Parts -> Int -> [Text] -> Text
- renderAscii :: Int -> [Text] -> Text
- renderUnicode :: Int -> [Text] -> Text
- put :: MonadTerminal m => Parts -> Int -> [Text] -> m ()
- putAscii :: MonadTerminal m => Int -> [Text] -> m ()
- putUnicode :: MonadTerminal m => Int -> [Text] -> m ()
- putAuto :: MonadTerminal m => Parts -> Int -> [Text] -> m ()
- putAutoAscii :: MonadTerminal m => Int -> [Text] -> m ()
- putAutoUnicode :: MonadTerminal m => Int -> [Text] -> m ()
Constants
Parts
Text parts of a horizontal rule
Since: 0.3.0.0
asciiParts :: Parts Source #
ASCII text parts of a horizontal rule
Since: 0.3.0.0
unicodeParts :: Parts Source #
Unicode text parts of a horizontal rule
Since: 0.3.0.0
API
Pure
Render a horizontal rule
Note that the rendered horizontal rule maybe longer than the specified rule width if the provided notes is too wide.
Since: 0.3.0.0
Render an ASCII horizontal rule
Note that the rendered horizontal rule maybe longer than the specified rule width if the provided notes is too wide.
Since: 0.3.0.0
Render a Unicode horizontal rule
Note that the rendered horizontal rule maybe longer than the specified rule width if the provided notes is too wide.
Since: 0.3.0.0
IO
:: MonadTerminal m | |
=> Parts | |
-> Int | rule width (characters) |
-> [Text] | notes |
-> m () |
Write a horizontal rule to the standard output device
Since: 0.5.0.0
:: MonadTerminal m | |
=> Int | rule width (characters) |
-> [Text] | notes |
-> m () |
Write an ASCII horizontal rule to the standard output device
Since: 0.5.0.0
:: MonadTerminal m | |
=> Int | rule width (characters) |
-> [Text] | notes |
-> m () |
Write a Unicode horizontal rule to the standard output device
Since: 0.5.0.0
:: MonadTerminal m | |
=> Parts | |
-> Int | default rule width (characters) |
-> [Text] | notes |
-> m () |
Write a full-width horizontal rule to the standard output device
The default rule width is used if the terminal width cannot be determined.
Since: 0.5.0.0
:: MonadTerminal m | |
=> Int | default rule width (characters) |
-> [Text] | notes |
-> m () |
Write a full-width ASCII horizontal rule to the standard output device
The default rule width is used if the terminal width cannot be determined.
Since: 0.5.0.0
:: MonadTerminal m | |
=> Int | default rule width (characters) |
-> [Text] | notes |
-> m () |
Write a full-width Unicode horizontal rule to the standard output device
The default rule width is used if the terminal width cannot be determined.
Since: 0.5.0.0