• patrickdoc's avatar
    users_guide: Convert mkUserGuidePart generation to a Sphinx extension · cf8ab1ce
    patrickdoc authored
    This removes all dependencies the users guide had on `mkUserGuidePart`.
    The generation of the flag reference table and the various pieces of the
    man page is now entirely contained within the Spinx extension
    `flags.py`. You can see the man page generation on the orphan page
    https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghc.html
    
    The extension works by collecting all of the meta-data attached to the
    `ghc-flag` directives and then formatting and displaying it at
    `flag-print` directives. There is a single printing directive that can
    be customized with two options, what format to display (table, list, or
    block of flags) and an optional category to limit the output to
    (verbosity, warnings, codegen, etc.).
    
    New display formats can be added by creating a function
    `generate_flag_xxx` (where `xxx` is a description of the format) which
    takes a list of flags and a category and returns a new `xxx`. Then just
    add a reference in the ...
    cf8ab1ce
debugging.rst 18.3 KB