b9-0.5.43: A tool and library for building virtual machine images.

Safe HaskellNone
LanguageHaskell2010

B9.Invokation

Synopsis

Documentation

data B9Invokation res a Source #

A monad encapsulating all configuration adaptions happening before any actual build actions are performed. Use invokeB9 to execute these things. Inside the B9Invokation monad you can influence and inspect the b9 configuration, the permanent, as well as the transient.

Instances

Monad (B9Invokation res) Source # 

Methods

(>>=) :: B9Invokation res a -> (a -> B9Invokation res b) -> B9Invokation res b #

(>>) :: B9Invokation res a -> B9Invokation res b -> B9Invokation res b #

return :: a -> B9Invokation res a #

fail :: String -> B9Invokation res a #

Functor (B9Invokation res) Source # 

Methods

fmap :: (a -> b) -> B9Invokation res a -> B9Invokation res b #

(<$) :: a -> B9Invokation res b -> B9Invokation res a #

Applicative (B9Invokation res) Source # 

Methods

pure :: a -> B9Invokation res a #

(<*>) :: B9Invokation res (a -> b) -> B9Invokation res a -> B9Invokation res b #

liftA2 :: (a -> b -> c) -> B9Invokation res a -> B9Invokation res b -> B9Invokation res c #

(*>) :: B9Invokation res a -> B9Invokation res b -> B9Invokation res b #

(<*) :: B9Invokation res a -> B9Invokation res b -> B9Invokation res a #

MonadIO (B9Invokation res) Source # 

Methods

liftIO :: IO a -> B9Invokation res a #

invokeB9 :: B9Invokation res () -> IO (Maybe res) Source #

Run a B9Invokation. If the user has no B9 config file yet, a default config file will be created.

overrideWorkingDirectory :: FilePath -> B9Invokation a () Source #

Override the current working directory during execution of the actions added with doAfterConfiguration.

mergeAfterConfigurationActionResults :: (Maybe a -> Maybe b -> ReaderT B9Config IO b) -> B9Invokation a () -> B9Invokation b () Source #

Combine the result of a given B9Invokation and the results of the action defined by doAfterConfiguration in the current state.

ignoreActionResults :: B9Invokation a () -> B9Invokation () () Source #

Ignore the results of the actions defined by doAfterConfiguration. All actions will be executed, but the result will be replaced with '()'.

doAfterConfiguration :: (Maybe a -> ReaderT B9Config IO a) -> B9Invokation a () Source #

Add an action to be executed once the configuration has been done. The action will be called with the result of the previous action defined by this function. In case this is the first action added Nothing is passed.

overrideB9ConfigPath :: SystemPath -> B9Invokation a () Source #

Override the B9 configuration path

modifyInvokationConfig :: (B9Config -> B9Config) -> B9Invokation a () Source #

Modify the current B9Config. The modifications are not reflected in the config file or the ConfigParser returned by askInvokationConfigParser.

modifyPermanentConfig :: (B9Config -> B9Config) -> B9Invokation a () Source #

Modify the current B9Config. The modifications are not reflected in the config file or the ConfigParser returned by askInvokationConfigParser.