cabal-gild-1.3.1.0: Formats package descriptions.
Safe HaskellSafe-Inferred
LanguageHaskell2010

CabalGild.Unstable.Type.Chunk

Description

This module defines the Chunk data type.

Synopsis

Documentation

data Chunk Source #

A chunk of text, which is made up of a byte string and can have blank spaces before and/or after it.

Constructors

Chunk 

Fields

Instances

Instances details
Monoid Chunk Source #

The empty chunk has no value and also no blank spaces before or after.

Instance details

Defined in CabalGild.Unstable.Type.Chunk

Methods

mempty :: Chunk #

mappend :: Chunk -> Chunk -> Chunk #

mconcat :: [Chunk] -> Chunk #

Semigroup Chunk Source #

Joins two chunks together by adding a blank space between them if necessary. (A blank space is necessary if both chunks need a space.) If either chunk is empty, the other chunk is returned.

Instance details

Defined in CabalGild.Unstable.Type.Chunk

Methods

(<>) :: Chunk -> Chunk -> Chunk #

sconcat :: NonEmpty Chunk -> Chunk #

stimes :: Integral b => b -> Chunk -> Chunk #

Show Chunk Source # 
Instance details

Defined in CabalGild.Unstable.Type.Chunk

Methods

showsPrec :: Int -> Chunk -> ShowS #

show :: Chunk -> String #

showList :: [Chunk] -> ShowS #

Eq Chunk Source # 
Instance details

Defined in CabalGild.Unstable.Type.Chunk

Methods

(==) :: Chunk -> Chunk -> Bool #

(/=) :: Chunk -> Chunk -> Bool #

colon :: Chunk Source #

A colon with a space after.

fromByteString :: ByteString -> Chunk Source #

Converts a byte string into a chunk without blank spaces before or after.

isEmpty :: Chunk -> Bool Source #

Returns True if the chunk's byte string is empty.

spaceAfterLens :: Lens' Chunk Bool Source #

A lens for the spaceAfter field.