-- parsers --

-- | Builder for a command parser. The 'command' modifier can be used to
-- specify individual commands.
subparser :: Mod CommandFields a -> Parser a
subparser m = mkParser d g rdr
  where
    Mod _ d g = metavar "COMMAND" `mappend` m
    rdr = uncurry CmdReader (mkCommand m)

-- | Builder for an argument parser.
subparser :: Mod CommandFields a -> Parser a
subparser m = mkParser d g rdr
  where
    Mod _ d g = metavar "COMMAND" `mappend` m
    rdr = uncurry CmdReader (mkCommand m)

-- | Builder for an argument parser.
subparser m = mkParser d g rdr
  where
    Mod _ d g = metavar "COMMAND" `mappend` m
    rdr = uncurry CmdReader (mkCommand m)

-- | Builder for an argument parser.