snap-0.9.0.1: Snap: A Haskell Web Framework: project starter executable and glue code library

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

The Typeable instance is here so Snap can be dynamically executed with Hint.

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.