Safe Haskell | None |
---|---|
Language | Haskell98 |
- property :: Desc -> Propellor Result -> Property
- propertyList :: Desc -> [Property] -> Property
- combineProperties :: Desc -> [Property] -> Property
- before :: Property -> Property -> Property
- flagFile :: Property -> FilePath -> Property
- flagFile' :: Property -> IO FilePath -> Property
- onChange :: Property -> Property -> Property
- (==>) :: Desc -> Property -> Property
- check :: IO Bool -> Property -> Property
- trivial :: Property -> Property
- doNothing :: Property
- withOS :: Desc -> (Maybe System -> Propellor Result) -> Property
- boolProperty :: Desc -> IO Bool -> Property
- revert :: RevertableProperty -> RevertableProperty
- host :: HostName -> Host
- (&) :: IsProp p => Host -> p -> Host
- (!) :: Host -> RevertableProperty -> Host
- (&^) :: IsProp p => Host -> p -> Host
- adjustProperty :: Property -> (Propellor Result -> Propellor Result) -> Property
- combineInfo :: (IsProp p, IsProp q) => p -> q -> Info
- combineInfos :: IsProp p => [p] -> Info
- makeChange :: IO () -> Propellor Result
- noChange :: Propellor Result
Documentation
propertyList :: Desc -> [Property] -> Property Source
Combines a list of properties, resulting in a single property that when run will run each property in the list in turn, and print out the description of each as it's run. Does not stop on failure; does propigate overall success/failure.
combineProperties :: Desc -> [Property] -> Property Source
Combines a list of properties, resulting in one property that ensures each in turn. Does not stop on failure; does propigate overall success/failure.
before :: Property -> Property -> Property Source
Combines together two properties, resulting in one property that ensures the first, and if the first succeeds, ensures the second. The property uses the description of the first property.
flagFile :: Property -> FilePath -> Property Source
Makes a perhaps non-idempotent Property be idempotent by using a flag file to indicate whether it has run before. Use with caution.
check :: IO Bool -> Property -> Property Source
Makes a Property only need to do anything when a test succeeds.
trivial :: Property -> Property Source
Marks a Property as trivial. It can only return FailedChange or NoChange.
Useful when it's just as expensive to check if a change needs to be made as it is to just idempotently assure the property is satisfied. For example, chmodding a file.
withOS :: Desc -> (Maybe System -> Propellor Result) -> Property Source
Makes a property that is satisfied differently depending on the host's operating system.
Note that the operating system may not be declared for some hosts.
revert :: RevertableProperty -> RevertableProperty Source
Undoes the effect of a property.
host :: HostName -> Host Source
Starts accumulating the properties of a Host.
host "example.com" & someproperty ! oldproperty & otherproperty
(&) :: IsProp p => Host -> p -> Host infixl 1 Source
Adds a property to a Host
Can add Properties and RevertableProperties
(!) :: Host -> RevertableProperty -> Host infixl 1 Source
Adds a property to the Host in reverted form.
(&^) :: IsProp p => Host -> p -> Host infixl 1 Source
Like (&), but adds the property as the first property of the host. Normally, property order should not matter, but this is useful when it does.
combineInfo :: (IsProp p, IsProp q) => p -> q -> Info Source
combineInfos :: IsProp p => [p] -> Info Source
makeChange :: IO () -> Propellor Result Source