From 4d29cdfc55ceb564e01f0e00f1bf8a8d8c5d38e6 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 25 May 2004 10:41:46 +0000 Subject: [haddock @ 2004-05-25 10:41:46 by simonmar] Complain if -h is used with --gen-index or --gen-contents, because it'll overwrite the new index/contents. --- src/Main.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/Main.hs b/src/Main.hs index 41612ed3..fa128388 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -205,6 +205,10 @@ run flags files = do writeIORef saved_flags flags + when ((Flag_GenIndex `elem` flags || Flag_GenContents `elem` flags) + && Flag_Html `elem` flags) $ + die ("-h cannot be used with --gen-index or --gen-contents") + when (Flag_GenContents `elem` flags) $ do ppHtmlContents odir title maybe_index_url visible_read_ifaces prologue copyHtmlBits odir libdir css_file -- cgit v1.2.3