Copyright | (c) 2019-2020 Vaclav Svejcar |
---|---|
License | BSD-3 |
Maintainer | vaclav.svejcar@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
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.
RunOptions | |
|
Instances
Eq RunOptions Source # | |
Defined in Headroom.Command.Run.Env (==) :: RunOptions -> RunOptions -> Bool # (/=) :: RunOptions -> RunOptions -> Bool # | |
Show RunOptions Source # | |
Defined in Headroom.Command.Run.Env showsPrec :: Int -> RunOptions -> ShowS # show :: RunOptions -> String # showList :: [RunOptions] -> ShowS # |
data StartupEnv Source #
Initial RIO startup environment for the Run command.
StartupEnv | |
|
Instances
HasLogFunc StartupEnv Source # | |
Defined in Headroom.Command.Run.Env logFuncL :: Lens' StartupEnv LogFunc | |
HasRunOptions StartupEnv Source # | |
Defined in Headroom.Command.Run.Env runOptionsL :: Lens' StartupEnv RunOptions Source # |
Full RIO environment for the Run command.
Env | |
|
Instances
HasLogFunc Env Source # | |
Defined in Headroom.Command.Run.Env | |
HasRunOptions Env Source # | |
Defined in Headroom.Command.Run.Env runOptionsL :: Lens' Env RunOptions Source # | |
HasAppConfig Env Source # | |
Defined in Headroom.Command.Run.Env appConfigL :: Lens' Env AppConfig Source # |
class HasAppConfig env where Source #
Environment value with application configuration.
appConfigL :: Lens' env AppConfig Source #
Application config lens.
Instances
HasAppConfig Env Source # | |
Defined in Headroom.Command.Run.Env appConfigL :: Lens' Env AppConfig Source # |
class HasRunOptions env where Source #
Environment value with Run command options.
runOptionsL :: Lens' env RunOptions Source #
Run command options lens.
Instances
HasRunOptions Env Source # | |
Defined in Headroom.Command.Run.Env runOptionsL :: Lens' Env RunOptions Source # | |
HasRunOptions StartupEnv Source # | |
Defined in Headroom.Command.Run.Env runOptionsL :: Lens' StartupEnv RunOptions Source # |
:: MonadThrow m | |
=> RunOptions | Run command options |
-> m AppConfig | application configuration |
Converts options for Run command into application config.