Safe Haskell | None |
---|---|
Language | Haskell98 |
- property :: Desc -> Propellor Result -> Property NoInfo
- flagFile :: Property i -> FilePath -> Property i
- flagFile' :: Property i -> IO FilePath -> Property i
- onChange :: Combines (Property x) (Property y) => Property x -> Property y -> CombinedType (Property x) (Property y)
- (==>) :: IsProp (Property i) => Desc -> Property i -> Property i
- check :: IO Bool -> Property i -> Property i
- fallback :: Combines (Property p1) (Property p2) => Property p1 -> Property p2 -> Property (CInfo p1 p2)
- trivial :: Property i -> Property i
- withOS :: Desc -> (Maybe System -> Propellor Result) -> Property NoInfo
- revert :: RevertableProperty -> RevertableProperty
- makeChange :: IO () -> Propellor Result
- noChange :: Propellor Result
- doNothing :: Property NoInfo
- endAction :: Desc -> (Result -> Propellor Result) -> Propellor ()
Documentation
property :: Desc -> Propellor Result -> Property NoInfo Source
Constructs a Property, from a description and an action to run to ensure the Property is met.
flagFile :: Property i -> FilePath -> Property i Source
Makes a perhaps non-idempotent Property be idempotent by using a flag file to indicate whether it has run before. Use with caution.
onChange :: Combines (Property x) (Property y) => Property x -> Property y -> CombinedType (Property x) (Property y) Source
Whenever a change has to be made for a Property, causes a hook Property to also be run, but not otherwise.
(==>) :: IsProp (Property i) => Desc -> Property i -> Property i infixl 1 Source
Alias for flip describe
check :: IO Bool -> Property i -> Property i Source
Makes a Property only need to do anything when a test succeeds.
fallback :: Combines (Property p1) (Property p2) => Property p1 -> Property p2 -> Property (CInfo p1 p2) Source
Tries the first property, but if it fails to work, instead uses the second.
trivial :: Property i -> Property i 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 NoInfo 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.
makeChange :: IO () -> Propellor Result Source