Safe Haskell | None |
---|---|
Language | Haskell98 |
- 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.
Host | |
|
Propellor's monad provides read-only access to info about the host it's running on, and a writer to accumulate EndActions.
class LiftPropellor m where Source #
liftPropellor :: m a -> Propellor a Source #
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.
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.
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.