diff options
author | Josh Meredith <joshmeredith2008@gmail.com> | 2019-12-16 19:08:03 +1100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-12-17 07:25:17 -0500 |
commit | 4374983a60d533768d7cc8a3b29a6e9a2e6babdb (patch) | |
tree | f716c649144177683602d86810800de2846cb77b | |
parent | 41f4e4fbe637d22bfded6f1597af57337ae5cf15 (diff) | |
download | haskell-4374983a60d533768d7cc8a3b29a6e9a2e6babdb.tar.gz |
Rename SphinxMode constructors
-rw-r--r-- | hadrian/src/Hadrian/Builder/Sphinx.hs | 12 | ||||
-rw-r--r-- | hadrian/src/Rules/Documentation.hs | 8 | ||||
-rw-r--r-- | hadrian/src/Settings/Default.hs | 16 |
3 files changed, 18 insertions, 18 deletions
diff --git a/hadrian/src/Hadrian/Builder/Sphinx.hs b/hadrian/src/Hadrian/Builder/Sphinx.hs index 5e4fa9fac4..7a56804cd5 100644 --- a/hadrian/src/Hadrian/Builder/Sphinx.hs +++ b/hadrian/src/Hadrian/Builder/Sphinx.hs @@ -10,7 +10,7 @@ ----------------------------------------------------------------------------- module Hadrian.Builder.Sphinx (SphinxMode (..), args) where -import Development.Shake hiding (Verbosity(..)) +import Development.Shake import Development.Shake.Classes import GHC.Generics import Hadrian.Expression @@ -18,7 +18,7 @@ import Hadrian.Utilities -- | Sphinx can be used in three different modes to convert reStructuredText -- documents into HTML, LaTeX or Man pages. -data SphinxMode = Info | Html | Latex | Man deriving (Eq, Generic, Show) +data SphinxMode = InfoM | HtmlM | LatexM | ManM deriving (Eq, Generic, Show) instance Binary SphinxMode instance Hashable SphinxMode @@ -36,7 +36,7 @@ args mode = do , arg outPath ] where modeString = case mode of - Info -> "texinfo" - Html -> "html" - Latex -> "latex" - Man -> "man" + InfoM -> "texinfo" + HtmlM -> "html" + LatexM -> "latex" + ManM -> "man" diff --git a/hadrian/src/Rules/Documentation.hs b/hadrian/src/Rules/Documentation.hs index 5296e2bea3..31026b6bb5 100644 --- a/hadrian/src/Rules/Documentation.hs +++ b/hadrian/src/Rules/Documentation.hs @@ -172,7 +172,7 @@ buildSphinxHtml path = do rstFilesDir = pathPath path rstFiles <- getDirectoryFiles rstFilesDir ["**/*.rst"] need (map (rstFilesDir -/-) rstFiles) - build $ target docContext (Sphinx Html) [pathPath path] [dest] + build $ target docContext (Sphinx HtmlM) [pathPath path] [dest] checkSphinxWarnings dest ------------------------------------ Haddock ----------------------------------- @@ -285,7 +285,7 @@ buildSphinxPdf path = do let rstFilesDir = pathPath path rstFiles <- getDirectoryFiles rstFilesDir ["**/*.rst"] need (map (rstFilesDir -/-) rstFiles) - build $ target docContext (Sphinx Latex) [pathPath path] [dir] + build $ target docContext (Sphinx LatexM) [pathPath path] [dir] checkSphinxWarnings dir build $ target docContext Xelatex [path <.> "tex"] [dir] copyFileUntracked (dir -/- path <.> "pdf") file @@ -302,7 +302,7 @@ buildSphinxInfoGuide = do let rstFilesDir = pathPath path rstFiles <- getDirectoryFiles rstFilesDir ["**/*.rst"] need (map (rstFilesDir -/-) rstFiles) - build $ target docContext (Sphinx Info) [pathPath path] [dir] + build $ target docContext (Sphinx InfoM) [pathPath path] [dir] checkSphinxWarnings dir -- Sphinx outputs texinfo source and a makefile, the -- default target of which actually produces the target @@ -334,7 +334,7 @@ buildManPage = do root -/- manPageBuildPath %> \file -> do need ["docs/users_guide/ghc.rst"] withTempDir $ \dir -> do - build $ target docContext (Sphinx Man) ["docs/users_guide"] [dir] + build $ target docContext (Sphinx ManM) ["docs/users_guide"] [dir] checkSphinxWarnings dir copyFileUntracked (dir -/- "ghc.1") file diff --git a/hadrian/src/Settings/Default.hs b/hadrian/src/Settings/Default.hs index 0d60c39533..f2a73870d1 100644 --- a/hadrian/src/Settings/Default.hs +++ b/hadrian/src/Settings/Default.hs @@ -249,14 +249,14 @@ defaultBuilderArgs = mconcat , validateBuilderArgs , xelatexBuilderArgs -- Generic builders from the Hadrian library: - , builder (Ar Pack ) ? Hadrian.Builder.Ar.args Pack - , builder (Ar Unpack ) ? Hadrian.Builder.Ar.args Unpack - , builder (Sphinx Html ) ? Hadrian.Builder.Sphinx.args Html - , builder (Sphinx Latex) ? Hadrian.Builder.Sphinx.args Latex - , builder (Sphinx Man ) ? Hadrian.Builder.Sphinx.args Man - , builder (Sphinx Info ) ? Hadrian.Builder.Sphinx.args Info - , builder (Tar Create ) ? Hadrian.Builder.Tar.args Create - , builder (Tar Extract ) ? Hadrian.Builder.Tar.args Extract ] + , builder (Ar Pack ) ? Hadrian.Builder.Ar.args Pack + , builder (Ar Unpack ) ? Hadrian.Builder.Ar.args Unpack + , builder (Sphinx HtmlM ) ? Hadrian.Builder.Sphinx.args HtmlM + , builder (Sphinx LatexM) ? Hadrian.Builder.Sphinx.args LatexM + , builder (Sphinx ManM ) ? Hadrian.Builder.Sphinx.args ManM + , builder (Sphinx InfoM ) ? Hadrian.Builder.Sphinx.args InfoM + , builder (Tar Create ) ? Hadrian.Builder.Tar.args Create + , builder (Tar Extract ) ? Hadrian.Builder.Tar.args Extract ] -- | All 'Package'-dependent command line arguments. defaultPackageArgs :: Args |