Module

Options.Applicative.Help.Chunk

#Chunk

newtype Chunk a

The free monoid on a semigroup 'a'.

Constructors

Instances

#chunked

chunked :: forall a. (a -> a -> a) -> Chunk a -> Chunk a -> Chunk a

Given a semigroup structure on 'a', return a monoid structure on 'Chunk a'.

#listToChunk

listToChunk :: forall a. Monoid a => Array a -> Chunk a

Concatenate a list into a Chunk. 'listToChunk' satisfies:

#(<<+>>)

Operator alias for Options.Applicative.Help.Chunk.chunkBeside (right-associative / precedence 6)

#chunkBeside

chunkBeside :: Chunk Doc -> Chunk Doc -> Chunk Doc

Concatenate two 'Chunk's with a space in between. If one is empty, this

#(<</>>)

Operator alias for Options.Applicative.Help.Chunk.chunkBesideOrBelow (right-associative / precedence 6)

#chunkBesideOrBelow

chunkBesideOrBelow :: Chunk Doc -> Chunk Doc -> Chunk Doc

Concatenate two 'Chunk's with a softline in between. This is exactly like

#vcatChunks

vcatChunks :: Array (Chunk Doc) -> Chunk Doc

Concatenate 'Chunk's vertically.

#vsepChunks

vsepChunks :: Array (Chunk Doc) -> Chunk Doc

Concatenate 'Chunk's vertically separated by empty lines.

#isEmpty

isEmpty :: forall a. Chunk a -> Boolean

Whether a 'Chunk' is empty. Note that something like 'pure mempty' is not

#stringChunk

stringChunk :: String -> Chunk Doc

Convert a 'String' into a 'Chunk'. This satisfies:

#paragraph

paragraph :: String -> Chunk Doc

Convert a paragraph into a 'Chunk'. The resulting chunk is composed by the

#extractChunk

extractChunk :: forall a. Monoid a => Chunk a -> a

Part of a constrained comonad instance.

#tabulate

tabulate :: Array (Tuple Doc Doc) -> Chunk Doc

Display pairs of strings in a table.

Modules