packages feed

mdoc-0.2.0.0: src/Mdoc.hs

-- |
--
-- Module      : Mdoc
-- Copyright   : (c) 2026 Patrick Brisbin
-- License     : AGPL-3
-- Maintainer  : pbrisbin@gmail.com
-- Stability   : experimental
-- Portability : POSIX
module Mdoc
  ( -- * Types
    Mdoc (..)
  , MdocLine (..)
  , MacroArg (..)
  , MacroName (..)

    -- * Printing
  , putMdoc

    -- * Building
  , Named
  , name

    -- * Rendering
  , RenderResult (..)
  , renderTemplate
  , renderTemplateThrow

    -- ** Templates
  , Template
  , man1
  , man5
  , custom

    -- * Util
  , updateMdocdate
  ) where

import Mdoc.Prelude

import Mdoc.Data.Named
import Mdoc.Pretty
import Mdoc.Syntax
import Mdoc.Template
import Mdoc.UpdateMdocdate
import System.IO (stdout)

-- | Render an 'Mdoc' with 'ColorAuto' to @stdout@
--
-- For more flexibility, use "Mdoc.Pretty" directly.
putMdoc :: MonadIO m => Mdoc -> m ()
putMdoc = putDoc ColorAuto stdout . prettyMdoc