servant-serf-0.3.0.1: source/library/ServantSerf/Type/Flag.hs
module ServantSerf.Type.Flag where
import qualified System.Console.GetOpt as Console
data Flag
= ApiName String
| Depth String
| Help
| ModuleName String
| ServerName String
| Version
deriving (Eq, Show)
options :: [Console.OptDescr Flag]
options =
[ Console.Option
['h', '?']
["help"]
(Console.NoArg Help)
"Shows this help message, then exits."
, Console.Option
[]
["version"]
(Console.NoArg Version)
"Shows the version number, then exits."
, Console.Option
[]
["api-name"]
(Console.ReqArg ApiName "API_NAME")
"Sets the name to use for the API type. Defaults to `API`."
, Console.Option
[]
["depth"]
(Console.ReqArg Depth "DEPTH")
"Controls whether to search through only one directory (`shallow`) or recursively (`deep`). Defaults to `deep`."
, Console.Option
[]
["module-name"]
(Console.ReqArg ModuleName "MODULE_NAME")
"Sets the name of the generated module. By default this is generated from the source file name."
, Console.Option
[]
["server-name"]
(Console.ReqArg ServerName "SERVER_NAME")
"Sets the name to use for the server value. Defaults to `server`."
]