| Copyright | (c) 2019-2020 Vaclav Svejcar |
|---|---|
| License | BSD-3 |
| Maintainer | vaclav.svejcar@gmail.com |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Headroom.Command.Run.Env
Description
Data types and instances for the Run command environment.
Synopsis
- data RunOptions = RunOptions {
- roRunMode :: RunMode
- roSourcePaths :: [FilePath]
- roTemplatePaths :: [FilePath]
- roVariables :: [Text]
- roDebug :: Bool
- data StartupEnv = StartupEnv {
- envLogFunc :: !LogFunc
- envRunOptions :: !RunOptions
- data Env = Env {
- envEnv :: !StartupEnv
- envAppConfig :: !AppConfig
- class HasAppConfig env where
- appConfigL :: Lens' env AppConfig
- class HasRunOptions env where
- runOptionsL :: Lens' env RunOptions
- toAppConfig :: MonadThrow m => RunOptions -> m AppConfig
Documentation
data RunOptions Source #
Options for the Run command.
Constructors
| RunOptions | |
Fields
| |
Instances
| Eq RunOptions Source # | |
Defined in Headroom.Command.Run.Env | |
| Show RunOptions Source # | |
Defined in Headroom.Command.Run.Env Methods showsPrec :: Int -> RunOptions -> ShowS # show :: RunOptions -> String # showList :: [RunOptions] -> ShowS # | |
data StartupEnv Source #
Initial RIO startup environment for the Run command.
Constructors
| StartupEnv | |
Fields
| |
Instances
| HasLogFunc StartupEnv Source # | |
Defined in Headroom.Command.Run.Env Methods logFuncL :: Lens' StartupEnv LogFunc | |
| HasRunOptions StartupEnv Source # | |
Defined in Headroom.Command.Run.Env Methods runOptionsL :: Lens' StartupEnv RunOptions Source # | |
Full RIO environment for the Run command.
Constructors
| Env | |
Fields
| |
Instances
| HasLogFunc Env Source # | |
Defined in Headroom.Command.Run.Env | |
| HasRunOptions Env Source # | |
Defined in Headroom.Command.Run.Env Methods runOptionsL :: Lens' Env RunOptions Source # | |
| HasAppConfig Env Source # | |
Defined in Headroom.Command.Run.Env Methods appConfigL :: Lens' Env AppConfig Source # | |
class HasAppConfig env where Source #
Environment value with application configuration.
Instances
| HasAppConfig Env Source # | |
Defined in Headroom.Command.Run.Env Methods appConfigL :: Lens' Env AppConfig Source # | |
class HasRunOptions env where Source #
Environment value with Run command options.
Instances
| HasRunOptions Env Source # | |
Defined in Headroom.Command.Run.Env Methods runOptionsL :: Lens' Env RunOptions Source # | |
| HasRunOptions StartupEnv Source # | |
Defined in Headroom.Command.Run.Env Methods runOptionsL :: Lens' StartupEnv RunOptions Source # | |
Arguments
| :: MonadThrow m | |
| => RunOptions | Run command options |
| -> m AppConfig | application configuration |
Converts options for Run command into application config.