    module GetOpt.Declarative.Types where

    import           Prelude ()
    import           Test.Hspec.Core.Compat

    data Option config = Option {
      forall config. Option config -> String
    optionName :: String
    , forall config. Option config -> Maybe Char
    optionShortcut :: Maybe Char
    , forall config. Option config -> OptionSetter config
    optionSetter :: OptionSetter config
    , forall config. Option config -> String
    optionHelp :: String
    , forall config. Option config -> Bool
    optionDocumented :: Bool
    }

    data OptionSetter config =
        NoArg (config -> config)
      | Flag (Bool -> config -> config)
      | OptArg String (Maybe String -> config -> Maybe config)
      | Arg String (String -> config -> Maybe config)