Copyright | (c) 2019-2021 Vaclav Svejcar |
---|---|
License | BSD-3-Clause |
Maintainer | vaclav.svejcar@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Headroom.Command.Init
Description
Module representing the init
command, responsible for generating all the
required files (configuration, templates) for the given project, which are then
required by the run
or gen
commands.
Synopsis
- data Env = Env {}
- data Paths = Paths {}
- commandInit :: CommandInitOptions -> IO ()
- doesAppConfigExist :: (HasLogFunc env, Has (FileSystem (RIO env)) env, Has Paths env) => RIO env Bool
- findSupportedFileTypes :: (Has CommandInitOptions env, HasLogFunc env) => RIO env [FileType]
Documentation
RIO Environment for the init
command.
Constructors
Env | |
Fields
|
Instances
HasLogFunc Env Source # | |
Has CommandInitOptions Env Source # | |
Defined in Headroom.Command.Init Methods getter :: Env -> CommandInitOptions Source # modifier :: (CommandInitOptions -> CommandInitOptions) -> Env -> Env Source # hasLens :: Lens' Env CommandInitOptions Source # viewL :: MonadReader Env m => m CommandInitOptions Source # | |
Has Paths Env Source # | |
Has (FileSystem (RIO Env)) Env Source # | |
Defined in Headroom.Command.Init |
Paths to various locations of file system.
Constructors
Paths | |
Fields |
Arguments
:: CommandInitOptions |
|
-> IO () | execution result |
Handler for init
command.
doesAppConfigExist :: (HasLogFunc env, Has (FileSystem (RIO env)) env, Has Paths env) => RIO env Bool Source #
Checks whether application config file already exists.
findSupportedFileTypes :: (Has CommandInitOptions env, HasLogFunc env) => RIO env [FileType] Source #
Recursively scans provided source paths for known file types for which templates can be generated.