    module WithCli.Pure (
      withCliPure,
      WithCliPure(),
      Result(..),
      handleResult,
      HasArguments(argumentsParser),
      atomicArgumentsParser,
      Argument(argumentType, parseArgument),
      -- * Modifiers
      Modifier(..),
      -- * Useful Re-exports
      GHC.Generic,
      Typeable,
      Proxy(..),
    ) where

    import           Data.Proxy
    import           Data.Typeable
    import           GHC.Generics as GHC

    import           WithCli.Argument
    import           WithCli.HasArguments
    import           WithCli.Modifier
    import           WithCli.Parser
    import           WithCli.Pure.Internal
    import           WithCli.Result

    -- | Pure variant of 'WithCli.withCliModified'.
    withCliPure :: WithCliPure function a => String -> [Modifier] -> [String]
      -> function
        -- ^ The @function@ parameter can be a
        -- function with arbitrary many parameters as long as they have an instance
        -- for 'HasArguments'. You can choose the return type of @function@ freely,
        -- 'withCliPure' will return it wrapped in 'Result' to account for parse
        -- errors, etc. (see 'Result').
      -> Result a
    withCliPure :: forall function a.
    WithCliPure function a =>
    String -> [Modifier] -> [String] -> function -> Result a
    withCliPure String
    progName [Modifier]
    modifiers [String]
    args function
    function = Result a -> Result a
    forall a. Result a -> Result a
    sanitize (Result a -> Result a) -> Result a -> Result a
    forall a b. (a -> b) -> a -> b
    $ do
      modifiers <- [Modifier] -> Result Modifiers
    mkModifiers [Modifier]
    modifiers
      run progName modifiers (return $ emptyParser ()) (\ () -> function
    function) args