pandoc-builder-monadic: A monadic DSL for building pandoc documents

[ bsd3, library, text ] [ Propose Tags ] [ Report a vulnerability ]

A convenient way to build pandoc documents. Supports all of the applicative and monadic utilities, and reduces syntactic noise via do notation.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0.0, 1.1.0, 1.1.1
Change log CHANGELOG.md
Dependencies base (>=4.9.0.0 && <5), dlist (>=0.2 && <2), mtl (>=1.1.0.0 && <3), pandoc-types (>=1.21 && <2), text (>=0.2 && <3) [details]
Tested with ghc ==9.6.2, ghc ==9.4.5, ghc ==9.2.8, ghc ==9.0.2, ghc ==8.10.7, ghc ==8.8.4, ghc ==8.6.5, ghc ==8.4.4, ghc ==8.2.2, ghc ==8.0.2
License BSD-3-Clause
Author Owen Shepherd
Maintainer owen@owen.cafe
Category Text
Home page https://github.com/414owen/pandoc-builder-monadic
Uploaded by 414owen at 2023-11-26T17:24:37Z
Distributions NixOS:1.1.1
Downloads 102 total (10 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for pandoc-builder-monadic-1.1.1

[back to package description]

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"