[Haddock documentation and small cleanup for Options.hs
Einar Karttunen <ekarttun@cs.helsinki.fi>**20050507144056] hunk ./Options.hs 18
-    optColumns     :: !Int,
-    optCompile     :: !Bool,
-    optDebug       :: !Bool,
-    optDump        ::  [String],
-    optFOpts       ::  [String],
-    optIncdirs     ::  [String],
-    optProgArgs    ::  [String],
-    optShowHo      ::  [String],
-    optCCargs      ::  [String],
-    optHls         ::  [String],
-    optBuildHl     ::  String,
-    optCC          ::  String,
+    optColumns     :: !Int,       -- ^ Width of terminal.
+    optCompile     :: !Bool,      -- ^ Compile.
+    optDebug       :: !Bool,      -- ^ Debugging.
+    optDump        ::  [String],  -- ^ Dump options (raw).
+    optFOpts       ::  [String],  -- ^ Flag options (raw).
+    optIncdirs     ::  [String],  -- ^ Include directories.
+    optProgArgs    ::  [String],  -- ^ Arguments to pass to the interpreted program.
+    optShowHo      ::  [String],  -- ^ Show ho-file.
+    optCCargs      ::  [String],  -- ^ Optional arguments to the C compiler.
+    optHls         ::  [String],  -- ^ Load the specified hl-files (haskell libraries).
+    optBuildHl     ::  String,    -- ^ Build a hl (haskell library) from the set of modules given.
+    optCC          ::  String,    -- ^ C compiler.
hunk ./Options.hs 31
-    optInteractive :: !Bool,
-    optVersion     :: !Bool,
-    optInterpret   :: !Bool,
-    optKeepGoing   :: !Bool,
-    optMainFunc    ::  Maybe (Bool,String),
-    optOutName     ::  String,
-    optPrelude     :: !Bool,
-    optIgnoreHo    :: !Bool,
-    optNoWriteHo   :: !Bool,
-    optVerbose     :: !Int,
-    optDumpSet     ::  S.Set FlagDump.Flag,
-    optFOptsSet    ::  S.Set FlagOpts.Flag
+    optInteractive :: !Bool,      -- ^ Run interactively.
+    optVersion     :: !Bool,      -- ^ Print version and die.
+    optInterpret   :: !Bool,      -- ^ Interpret.
+    optKeepGoing   :: !Bool,      -- ^ Keep going when encountering errors.
+    optMainFunc    ::  Maybe (Bool,String),    -- ^ Entry point name for the main function.
+    optOutName     ::  String,                 -- ^ Name of output file.
+    optPrelude     :: !Bool,                   -- ^ No implicit Prelude.
+    optIgnoreHo    :: !Bool,                   -- ^ Ignore ho-files.
+    optNoWriteHo   :: !Bool,                   -- ^ Don't write ho-files.
+    optVerbose     :: !Int,                    -- ^ Verbosity
+    optDumpSet     ::  S.Set FlagDump.Flag,    -- ^ Dump flags.
+    optFOptsSet    ::  S.Set FlagOpts.Flag     -- ^ Flag options (-f\<opt\>).
hunk ./Options.hs 104
+-- | Width of terminal.
hunk ./Options.hs 125
+-- | Parse commandline options.
+processOptions :: IO Opt
hunk ./Options.hs 153
+-- | The global options currently used.
hunk ./Options.hs 157
+-- | Put a string to stderr when running verbose.
+putVerbose :: String -> IO ()
hunk ./Options.hs 160
+
+-- | Put a line to stderr when running verbose.
+putVerboseLn :: String -> IO ()
hunk ./Options.hs 165
+-- | Is verbose > 0?
+verbose :: Bool
hunk ./Options.hs 168
+-- | Is verbose > 1?
+verbose2 :: Bool
hunk ./Options.hs 172
---dump s = s `S.member` S.fromList (optDump options)
-
+-- | Test whether a dump flag is set.
+dump :: FlagDump.Flag -> Bool
hunk ./Options.hs 175
+-- | Test whether an option flag is set.
+fopts :: FlagOpts.Flag -> Bool
hunk ./Options.hs 178
+-- | Do the action when the suplied dump flag is set.
+wdump :: (Monad m) => FlagDump.Flag -> m () -> m ()
hunk ./Options.hs 182
+-- | Is the \"lint\" option flag set?
+flint :: Bool
hunk ./Options.hs 186
+-- | Include directories taken from JHCPATH enviroment variable.
+initialIncludes :: [String]
hunk ./Options.hs 190
-    Just x <- return $  p `mplus` Just ""
+    let x = maybe "" id p
hunk ./Options.hs 193
-