diff options
Diffstat (limited to 'src/Haddock')
-rw-r--r-- | src/Haddock/Options.hs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/Haddock/Options.hs b/src/Haddock/Options.hs index 18b5597c..5e420ccc 100644 --- a/src/Haddock/Options.hs +++ b/src/Haddock/Options.hs @@ -1,3 +1,12 @@ +-- +-- Haddock - A Haskell Documentation Tool +-- +-- (c) Simon Marlow 2003 +-- +-- Ported to use the GHC API by David Waern during "Summer of Code" 2006 +-- + + module Haddock.Options ( parseHaddockOpts, Flag(..), @@ -14,6 +23,9 @@ getUsage :: IO String getUsage = do prog <- getProgramName return $ usageInfo (usageHeader prog) (options False) + where + usageHeader :: String -> String + usageHeader prog = "Usage: " ++ prog ++ " [OPTION...] file...\n" parseHaddockOpts :: [String] -> IO ([Flag], [String]) @@ -25,10 +37,6 @@ parseHaddockOpts words = throwE (concat errors ++ usage) -usageHeader :: String -> String -usageHeader prog = "Usage: " ++ prog ++ " [OPTION...] file...\n" - - data Flag = Flag_CSS String | Flag_Debug |