+-- | Description of the --timeout flag.
+--
+timeout_help :: String
+timeout_help =
+ "Query timeout, in seconds (default: " ++ defstr ++ ")"
+ where
+ defstr = show $ seconds (def :: Timeout)
+
+
+-- | The 'Args' type represents the possible command-line options. The
+-- duplication here seems necessary; CmdArgs's magic requires us to
+-- define some things explicitly.
+--
+data Args =
+ NS { no_append_root :: Bool,
+ server :: Maybe String,
+ timeout :: Timeout,
+ delegates :: [String] } |
+ MX { no_append_root :: Bool,
+ server :: Maybe String,
+ timeout :: Timeout,
+ delegates :: [String] }
+ deriving (Data, Show)
+
+
+
+-- | The big argument specification. We use explicit annotation here
+-- because otherwise there's come CmdArgs magic going on that
+-- requires us to specify /all/ of the arguments for /each/ mode;
+-- i.e. we have to duplicate all of them for both 'NS' and 'MX.
+--
+-- This is slightly arcane but at least it doesn't repeat yoself.
+--
+arg_spec :: Annotate Ann