packages feed

mdoc-0.3.0.0: src/Mdoc/Data/Command.hs

module Mdoc.Data.Command
  ( Command (..)
  ) where

import Mdoc.Prelude

import Mdoc.Data.Synopsis (Synopsis)
import Mdoc.Syntax.Mdoc

data Command = Command
  { index :: Int
  , name :: String
  , synopsis :: Synopsis
  , description :: Maybe Mdoc
  }
  deriving stock (Eq, Generic, Show)
  deriving anyclass (ToJSON)

instance Ord Command where
  compare = comparing (.index)