djot-0.1.4: Parser and renderer for djot light markup syntax.

Safe Haskell | Safe-Inferred
Language | Haskell2010

Djot.Options

Synopsis

- newtype ParseOptions = ParseOptions {
  - sourcePositions :: SourcePosOption
  }
- newtype RenderOptions = RenderOptions {
  - preserveSoftBreaks :: Bool
  }
- data SourcePosOption
  - = NoSourcePos
  - | BlockSourcePos
  - | AllSourcePos

# Documentation

newtype ParseOptions Source #

Constructors

ParseOptions |

Fields

- sourcePositions :: SourcePosOption

  Add attributes for source lines

#### Instances

Instances details

Show ParseOptions Source # |
Instance details Defined in Djot.Options Methods showsPrec :: Int -> ParseOptions -> ShowS Source # show :: ParseOptions -> String Source # showList :: [ParseOptions] -> ShowS Source #

newtype RenderOptions Source #

Constructors

RenderOptions |

Fields

- preserveSoftBreaks :: Bool

  Preserve soft breaks as in the source

#### Instances

Instances details

Show RenderOptions Source # |
Instance details Defined in Djot.Options Methods showsPrec :: Int -> RenderOptions -> ShowS Source # show :: RenderOptions -> String Source # showList :: [RenderOptions] -> ShowS Source #

data SourcePosOption Source #

Adding source positions for blocks adds almost no overhead to parsing. Adding source positions for inlines has a small penalty. For many purposes it is enough to have source lines for blocks, so we offer the option.

Constructors

NoSourcePos |
BlockSourcePos |
AllSourcePos |

#### Instances

Instances details

Show SourcePosOption Source # |
Instance details Defined in Djot.Options Methods showsPrec :: Int -> SourcePosOption -> ShowS Source # show :: SourcePosOption -> String Source # showList :: [SourcePosOption] -> ShowS Source #
Eq SourcePosOption Source # |
Instance details Defined in Djot.Options Methods (==) :: SourcePosOption -> SourcePosOption -> Bool Source # (/=) :: SourcePosOption -> SourcePosOption -> Bool Source #
Ord SourcePosOption Source # |

Instance details

Defined in Djot.Options

Methods

compare :: SourcePosOption -> SourcePosOption -> Ordering Source #

(<) :: SourcePosOption -> SourcePosOption -> Bool Source #

(<=) :: SourcePosOption -> SourcePosOption -> Bool Source #

(>) :: SourcePosOption -> SourcePosOption -> Bool Source #

(>=) :: SourcePosOption -> SourcePosOption -> Bool Source #

max :: SourcePosOption -> SourcePosOption -> SourcePosOption Source #

min :: SourcePosOption -> SourcePosOption -> SourcePosOption Source #