diff options
author | porges <porges@porg.es> | 2008-12-07 08:22:19 +0000 |
---|---|---|
committer | porges <porges@porg.es> | 2008-12-07 08:22:19 +0000 |
commit | 07c159d23f04cb56c8a71f531b491104cc725152 (patch) | |
tree | 2732c8cb6149e3a9d72472ce6a70dfcf2aa433b4 /src/Main.hs | |
parent | ee7bba02a3a4a10def502470cbf000a2ce99d722 (diff) |
add unicode output
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Main.hs b/src/Main.hs index 810c227e..cde7790c 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -242,7 +242,7 @@ render flags ifaces installedIfaces = do getDataDir -- provided by Cabal #endif fs -> return (last fs) - + let unicode = Flag_UseUnicode `elem` flags let css_file = case [str | Flag_CSS str <- flags] of [] -> Nothing fs -> Just (last fs) @@ -300,7 +300,7 @@ render flags ifaces installedIfaces = do ppHtml title packageStr visibleIfaces odir prologue maybe_html_help_format maybe_source_urls maybe_wiki_urls - maybe_contents_url maybe_index_url + maybe_contents_url maybe_index_url unicode copyHtmlBits odir libDir css_file when (Flag_Hoogle `elem` flags) $ do @@ -425,6 +425,9 @@ handleEasyFlags flags = do when (Flag_Version `elem` flags) byeVersion when (Flag_GhcVersion `elem` flags) byeGhcVersion + when (Flag_UseUnicode `elem` flags && not (Flag_Html `elem` flags)) $ + throwE ("Unicode can only be enabled for HTML output.") + when ((Flag_GenIndex `elem` flags || Flag_GenContents `elem` flags) && Flag_Html `elem` flags) $ throwE ("-h cannot be used with --gen-index or --gen-contents") |