HORIZON HASKELLDocslts/ghc-9.14.xb9228482026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · b922848 · 2026-10-12

Moduleoptparse-applicative-0.19.0.0Haskell98

Options.Applicative.Help.Chunk

Synopsis
newtypenewtype Chunk a

The free monoid on a semigroup a.

Constructors

Instances9Monad, Functor, Applicative, Alternative, MonadPlus, Eq, …
  • Monad ChunkDefined in optparse-applicative-0.19.0.0 · Options.Applicative.Help.Chunk
  • Functor ChunkDefined in optparse-applicative-0.19.0.0 · Options.Applicative.Help.Chunk
  • Applicative ChunkDefined in optparse-applicative-0.19.0.0 · Options.Applicative.Help.Chunk
  • Alternative ChunkDefined in optparse-applicative-0.19.0.0 · Options.Applicative.Help.Chunk
  • MonadPlus ChunkDefined in optparse-applicative-0.19.0.0 · Options.Applicative.Help.Chunk
  • Eq a => Eq (Chunk a)Defined in optparse-applicative-0.19.0.0 · Options.Applicative.Help.Chunk
  • Show a => Show (Chunk a)Defined in optparse-applicative-0.19.0.0 · Options.Applicative.Help.Chunk
  • Semigroup a => Semigroup (Chunk a)Defined in optparse-applicative-0.19.0.0 · Options.Applicative.Help.Chunk
  • Semigroup a => Monoid (Chunk a)Defined in optparse-applicative-0.19.0.0 · Options.Applicative.Help.Chunk
valueisEmpty :: Chunk a -> Bool

Whether a Chunk is empty. Note that something like 'pure mempty' is not considered an empty chunk, even though the underlying Doc is empty.

Convert a paragraph into a Chunk. The resulting chunk is composed by the words of the original paragraph separated by softlines, so it will be automatically word-wrapped when rendering the underlying document.

This satisfies:

isEmpty . paragraph = null . words
valueextractChunk :: Monoid a => Chunk a -> a

Part of a constrained comonad instance.

This is the counit of the adjunction between Chunk and the forgetful functor from monoids to semigroups. It satisfies:

extractChunk . pure = id
extractChunk . fmap pure = id