    {-# LANGUAGE OverloadedStrings #-}
    {- |
       Module      : Text.Pandoc.Readers.Mdoc.Macros
       Copyright   : © 2024 Evan Silberman
       License     : GNU GPL, version 2 or above

       Maintainer  : Evan Silberman <evan@jklol.net>
       Stability   : WIP
       Portability : portable

    -}
    module Text.Pandoc.Readers.Mdoc.Macros (isParsedMacro, isCallableMacro) where

    import Data.Set (member, fromList, Set)
    import Data.Text

    isParsedMacro :: Text -> Bool
    isParsedMacro :: Text -> Bool
    isParsedMacro Text
    a = Text -> Set Text -> Bool
    forall a. Ord a => a -> Set a -> Bool
    member Text
    a Set Text
    parsedMacros

    isCallableMacro :: Text -> Bool
    isCallableMacro :: Text -> Bool
    isCallableMacro Text
    a = Text -> Set Text -> Bool
    forall a. Ord a => a -> Set a -> Bool
    member Text
    a Set Text
    callableMacros

    parsedMacros :: Set Text
    parsedMacros :: Set Text
    parsedMacros = [Text] -> Set Text
    forall a. Ord a => [a] -> Set a
    fromList [
      Text
    "Ac",
      Text
    "Ad",
      Text
    "An",
      Text
    "Ao",
      Text
    "Ap",
      Text
    "Aq",
      Text
    "Ar",
      Text
    "At",
      Text
    "Bc",
      Text
    "Bo",
      Text
    "Bq",
      Text
    "Brc",
      Text
    "Bro",
      Text
    "Brq",
      Text
    "Bsx",
      Text
    "Bx",
      Text
    "Cd",
      Text
    "Cm",
      Text
    "D1",
      Text
    "Dc",
      Text
    "Dl",
      Text
    "Do",
      Text
    "Dq",
      Text
    "Dv",
      Text
    "Dx",
      Text
    "Ec",
      Text
    "Em",
      Text
    "En",
      Text
    "Eo",
      Text
    "Er",
      Text
    "Es",
      Text
    "Ev",
      Text
    "Fa",
      Text
    "Fc",
      Text
    "Fl",
      Text
    "Fn",
      Text
    "Fr",
      Text
    "Ft",
      Text
    "Fx",
      Text
    "Ic",
      Text
    "In",
      Text
    "It",
      Text
    "Li",
      Text
    "Lk",
      Text
    "Ms",
      Text
    "Mt",
      Text
    "Nm",
      Text
    "No",
      Text
    "Ns",
      Text
    "Nx",
      Text
    "Oc",
      Text
    "Oo",
      Text
    "Op",
      Text
    "Ot",
      Text
    "Ox",
      Text
    "Pa",
      Text
    "Pc",
      Text
    "Pf",
      Text
    "Po",
      Text
    "Pq",
      Text
    "Qc",
      Text
    "Ql",
      Text
    "Qo",
      Text
    "Qq",
      Text
    "Sc",
      Text
    "Sh",
      Text
    "So",
      Text
    "Sq",
      Text
    "Ss",
      Text
    "St",
      Text
    "Sx",
      Text
    "Sy",
      Text
    "Ta",
      Text
    "Tn",
      Text
    "Ux",
      Text
    "Va",
      Text
    "Vt",
      Text
    "Xc",
      Text
    "Xo",
      Text
    "Xr"]

    callableMacros :: Set Text
    callableMacros :: Set Text
    callableMacros = [Text] -> Set Text
    forall a. Ord a => [a] -> Set a
    fromList [
      Text
    "Ac",
      Text
    "Ad",
      Text
    "An",
      Text
    "Ao",
      Text
    "Ap",
      Text
    "Aq",
      Text
    "Ar",
      Text
    "At",
      Text
    "Bc",
      Text
    "Bo",
      Text
    "Bq",
      Text
    "Brc",
      Text
    "Bro",
      Text
    "Brq",
      Text
    "Bsx",
      Text
    "Bx",
      Text
    "Cd",
      Text
    "Cm",
      Text
    "Dc",
      Text
    "Do",
      Text
    "Dq",
      Text
    "Dv",
      Text
    "Dx",
      Text
    "Ec",
      Text
    "Em",
      Text
    "En",
      Text
    "Eo",
      Text
    "Er",
      Text
    "Es",
      Text
    "Ev",
      Text
    "Fa",
      Text
    "Fc",
      Text
    "Fl",
      Text
    "Fn",
      Text
    "Fo",
      Text
    "Fr",
      Text
    "Ft",
      Text
    "Fx",
      Text
    "Ic",
      Text
    "In",
      Text
    "Li",
      Text
    "Lk",
      Text
    "Ms",
      Text
    "Mt",
      Text
    "Nm",
      Text
    "No",
      Text
    "Ns",
      Text
    "Nx",
      Text
    "Oc",
      Text
    "Oo",
      Text
    "Op",
      Text
    "Ot",
      Text
    "Ox",
      Text
    "Pa",
      Text
    "Pc",
      Text
    "Pf",
      Text
    "Po",
      Text
    "Pq",
      Text
    "Qc",
      Text
    "Ql",
      Text
    "Qo",
      Text
    "Qq",
      Text
    "Sc",
      Text
    "So",
      Text
    "Sq",
      Text
    "St",
      Text
    "Sx",
      Text
    "Sy",
      Text
    "Ta",
      Text
    "Tn",
      Text
    "Ux",
      Text
    "Va",
      Text
    "Vt",
      Text
    "Xc",
      Text
    "Xo",
      Text
    "Xr"]