Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module defines the Chunk
data type.
Synopsis
- data Chunk = Chunk {
- spaceBefore :: Bool
- value :: ByteString
- spaceAfter :: Bool
- colon :: Chunk
- fromByteString :: ByteString -> Chunk
- isEmpty :: Chunk -> Bool
- spaceAfterLens :: Lens' Chunk Bool
- spaceBeforeLens :: Lens' Chunk Bool
Documentation
A chunk of text, which is made up of a byte string and can have blank spaces before and/or after it.
Chunk | |
|
Instances
Monoid Chunk Source # | The empty chunk has no value and also no blank spaces before or after. |
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. |
Show Chunk Source # | |
Eq Chunk Source # | |
fromByteString :: ByteString -> Chunk Source #
Converts a byte string into a chunk without blank spaces before or after.
spaceAfterLens :: Lens' Chunk Bool Source #
A lens for the spaceAfter
field.
spaceBeforeLens :: Lens' Chunk Bool Source #
A lens for the spaceBefore
field.