packages feed

mdoc-0.1.0.0: src/Mdoc/Gen/Man5.hs

-- |
--
-- Module      : Mdoc.Gen.Man5
-- Copyright   : (c) 2026 Patrick Brisbin
-- License     : AGPL-3
-- Maintainer  : pbrisbin@gmail.com
-- Stability   : experimental
-- Portability : POSIX
module Mdoc.Gen.Man5
  ( Man5 (..)
  , baseMan5
  ) where

import Mdoc.Prelude

import Mdoc.Gen.Config
import Mdoc.Gen.CrossRef
import Mdoc.Gen.Described
import Mdoc.Gen.File
import Mdoc.Gen.Name

data Man5 = Man5
  { name :: Name
  , files :: NonEmpty File
  , configs :: [Described Config]
  , seeAlso :: [CrossRef]
  }
  deriving stock (Eq, Generic, Show)

baseMan5 :: String -> String -> File -> Man5
baseMan5 name nameDescription file =
  Man5
    { name =
        Name
          { primary = name
          , secondaries = []
          , description = nameDescription
          }
    , files = pure file
    , configs = []
    , seeAlso = []
    }