snap-0.12.0: Top-level package for the Snap Web Framework

Safe Haskell | None

Snap.Snaplet.Config

Synopsis

- newtype AppConfig = AppConfig {
  - appEnvironment :: Maybe String
  }
- appConfigTyCon :: TyCon
- appOpts :: AppConfig -> [OptDescr (Maybe (Config m AppConfig))]
- commandLineAppConfig :: MonadSnap m => Config m AppConfig -> IO (Config m AppConfig)

# Documentation

newtype AppConfig

AppConfig contains the config options for command line arguments in snaplet-based apps.

Constructors

AppConfig |
Fields appEnvironment :: Maybe String

Instances

Typeable AppConfig |
Monoid AppConfig |

appConfigTyCon :: TyCon

AppConfig has a manual instance of Typeable due to limitations in the tools available before GHC 7.4, and the need to make dynamic loading tractable. When support for earlier versions of GHC is dropped, the dynamic loader package can be updated so that manual Typeable instances are no longer needed.

appOpts :: AppConfig -> [OptDescr (Maybe (Config m AppConfig))]

Command line options for snaplet applications.

commandLineAppConfig :: MonadSnap m => Config m AppConfig -> IO (Config m AppConfig)

Calls snap-server's extendedCommandLineConfig to add snaplet options to the built-in server command line options.