aboutsummaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2010-06-30 12:45:17 +0000
committerSimon Marlow <marlowsd@gmail.com>2010-06-30 12:45:17 +0000
commit29e0275bfb3442fcd354075ba5bee09e84503099 (patch)
tree743d508ec78533e98288f9a906113172dc45790f /src/Main.hs
parent3924891dc47a96e13707489b4e55b3fe8d1ce1d7 (diff)
LaTeX backend (new options: --latex, --latex-style=<style>)
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 1bf2b717..f6f899f3 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -20,6 +20,7 @@ module Main (main) where
import qualified Haddock.Backends.Html as Html
import qualified Haddock.Backends.Xhtml as Xhtml
+import qualified Haddock.Backends.LaTeX as LaTeX
import Haddock.Backends.Hoogle
import Haddock.Interface
import Haddock.Lex
@@ -179,6 +180,7 @@ render flags ifaces installedIfaces = do
opt_html_help_format = optHtmlHelpFormat flags
css_file = optCssFile flags
odir = outputDir flags
+ opt_latex_style = optLaTeXStyle flags
visibleIfaces = [ i | i <- ifaces, OptHide `notElem` ifaceOptions i ]
@@ -227,6 +229,9 @@ render flags ifaces installedIfaces = do
let pkgName2 = if pkgName == "main" && title /= [] then title else pkgName
ppHoogle pkgName2 pkgVer title prologue visibleIfaces odir
+ when (Flag_LaTeX `elem` flags) $ do
+ LaTeX.ppLaTeX title packageStr visibleIfaces odir prologue opt_latex_style
+ libDir
-------------------------------------------------------------------------------
-- Reading and dumping interface files