Module

Options.Applicative.Help.Chunk

Package
purescript-optparse
Repository
f-o-a-m/purescript-optparse

#Chunk Source

newtype Chunk a

The free monoid on a semigroup 'a'.

Constructors

Instances

#chunked Source

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 Source

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

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

#(<<+>>) Source

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

#chunkBeside Source

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

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

#(<</>>) Source

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

#chunkBesideOrBelow Source

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

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

#vcatChunks Source

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

Concatenate 'Chunk's vertically.

#vsepChunks Source

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

Concatenate 'Chunk's vertically separated by empty lines.

#isEmpty Source

isEmpty :: forall a. Chunk a -> Boolean

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

#stringChunk Source

stringChunk :: String -> Chunk Doc

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

#paragraph Source

paragraph :: String -> Chunk Doc

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

#extractChunk Source

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

Part of a constrained comonad instance.

#tabulate Source

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

Display pairs of strings in a table.