@hackage / pandoc-builder-monadic

A monadic DSL for building pandoc documents

Latest1.1.1

About

Metadata

  • Last updated , by 414owen
  • License BSD-3-Clause
  • Categories Text Processing
  • Maintained by: owen@owen.cafe

  • Lottery factor: 0

Links

Installation

Tested Compilers

  1. 9.6.2
  2. 9.4.5
  3. 9.2.8
  4. 9.0.2
  5. 8.10.7
  6. 8.8.4
  7. 8.6.5
  8. 8.4.4
  9. 8.2.2
  10. 8.0.2

Readme

pandoc-builder-monadic

CI status badge Hackage version badge license

This library provides a monadic DSL for constructing Pandoc documents.

Usage

{-# LANGUAGE OverloadedStrings #-}

import Text.Pandoc.Builder.Monadic

myDoc :: Pandoc
myDoc = doc $ do
  h1 "Hello, World!"
  para $ do
    str "Lorem ipsum "
    () <- "dolor sit amet"
    traverse (str . T.pack . show) [1..10 :: Int]
    pure ()
  para $ do
    strong "Wow, such code!"
    softbreak
    "It's a " <> strong "monoid" <> " too" <> emph "'cos why not"