Safe Haskell | None |
---|---|
Language | Haskell98 |
Propellor.Types.Core
- data Host = Host {
- hostName :: HostName
- hostProperties :: [ChildProperty]
- hostInfo :: Info
- newtype Propellor p = Propellor {
- runWithHost :: RWST Host [EndAction] () IO p
- class LiftPropellor m where
- data EndAction = EndAction Desc (Result -> Propellor Result)
- type Desc = String
- data Props metatypes = Props [ChildProperty]
- data ChildProperty = ChildProperty Desc (Propellor Result) Info [ChildProperty]
- class IsProp p where
Documentation
Everything Propellor knows about a system: Its hostname, properties and their collected info.
Constructors
Host | |
Fields
|
Propellor's monad provides read-only access to info about the host it's running on, and a writer to accumulate EndActions.
Constructors
Propellor | |
Fields
|
Instances
Monad Propellor Source # | |
Functor Propellor Source # | |
Applicative Propellor Source # | |
MonadIO Propellor Source # | |
MonadThrow Propellor Source # | |
MonadMask Propellor Source # | |
MonadCatch Propellor Source # | |
LiftPropellor Propellor Source # | |
MonadReader Host Propellor Source # | |
Monoid (Propellor Result) Source # | |
MonadWriter [EndAction] Propellor Source # | |
class LiftPropellor m where Source #
Minimal complete definition
Methods
liftPropellor :: m a -> Propellor a Source #
Instances
An action that Propellor runs at the end, after trying to satisfy all properties. It's passed the combined Result of the entire Propellor run.
Props is a combination of a list of properties, with their combined metatypes.
Constructors
Props [ChildProperty] |
data ChildProperty Source #
Since there are many different types of Properties, they cannot be put into a list. The simplified ChildProperty can be put into a list.
Constructors
ChildProperty Desc (Propellor Result) Info [ChildProperty] |
Instances
Minimal complete definition
setDesc, getDesc, getChildren, addChildren, getInfoRecursive, getInfo, toChildProperty, getSatisfy
Methods
setDesc :: p -> Desc -> p Source #
getChildren :: p -> [ChildProperty] Source #
addChildren :: p -> [ChildProperty] -> p Source #
getInfoRecursive :: p -> Info Source #
Gets the info of the property, combined with all info of all children properties.
Info, not including info from children.
toChildProperty :: p -> ChildProperty Source #
Gets a ChildProperty representing the Property. You should not normally need to use this.
getSatisfy :: p -> Propellor Result Source #
Gets the action that can be run to satisfy a Property.
You should never run this action directly. Use
ensureProperty
instead.