horizontal-rule-0.6.0.0: horizontal rule for the terminal
CopyrightCopyright (c) 2019-2023 Travis Cardwell
LicenseMIT
Safe HaskellSafe-Inferred
LanguageHaskell2010

HR

Description

This library is meant to be imported qualified, as follows:

import qualified HR
Synopsis

Constants

version :: String Source #

hr version string ("hr-haskell X.X.X.X")

Since: 0.3.0.0

Parts

data Parts Source #

Text parts of a horizontal rule

Since: 0.3.0.0

Constructors

Parts 

Fields

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 Source #

Arguments

:: Parts 
-> Int

rule width (characters)

-> [Text]

notes

-> Text 

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

renderAscii Source #

Arguments

:: Int

rule width (characters)

-> [Text]

notes

-> Text 

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

renderUnicode Source #

Arguments

:: Int

rule width (characters)

-> [Text]

notes

-> Text 

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

put Source #

Arguments

:: MonadTerminal m 
=> Parts 
-> Int

rule width (characters)

-> [Text]

notes

-> m () 

Write a horizontal rule to the standard output device

Since: 0.5.0.0

putAscii Source #

Arguments

:: MonadTerminal m 
=> Int

rule width (characters)

-> [Text]

notes

-> m () 

Write an ASCII horizontal rule to the standard output device

Since: 0.5.0.0

putUnicode Source #

Arguments

:: MonadTerminal m 
=> Int

rule width (characters)

-> [Text]

notes

-> m () 

Write a Unicode horizontal rule to the standard output device

Since: 0.5.0.0

putAuto Source #

Arguments

:: 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

putAutoAscii Source #

Arguments

:: 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

putAutoUnicode Source #

Arguments

:: 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