propellor-5.10.1: property-based host configuration management in haskell

Safe Haskell | None
Language | Haskell98

Propellor.PropAccum

Synopsis

- host :: HostName -> Props metatypes -> Host
- data Props metatypes = Props [ChildProperty]
- props :: Props UnixLike
- (&) :: (IsProp p, MetaTypes y ~ GetMetaTypes p, CheckCombinableNote x y (NoteFor (Text "&"))) => Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
- (&^) :: (IsProp p, MetaTypes y ~ GetMetaTypes p, CheckCombinableNote x y (NoteFor (Text "&^"))) => Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
- (!) :: CheckCombinableNote x z (NoteFor (Text "!")) => Props (MetaTypes x) -> RevertableProperty (MetaTypes y) (MetaTypes z) -> Props (MetaTypes (Combine x z))

# Documentation

host :: HostName -> Props metatypes -> Host Source #

Defines a host and its properties.

    host "example.com" $ props
    	& someproperty
    	! oldproperty
    	& otherproperty

data Props metatypes Source #

Props is a combination of a list of properties, with their combined metatypes.

Constructors

Props [ChildProperty] |

props :: Props UnixLike Source #

Start accumulating a list of properties.

Properties can be added to it using `(&)` etc.

(&) :: (IsProp p, MetaTypes y ~ GetMetaTypes p, CheckCombinableNote x y (NoteFor (Text "&"))) => Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y)) infixl 1 Source #

Adds a property to a Props.

Can add Properties and RevertableProperties

(&^) :: (IsProp p, MetaTypes y ~ GetMetaTypes p, CheckCombinableNote x y (NoteFor (Text "&^"))) => Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y)) infixl 1 Source #

Adds a property before any other properties.

(!) :: CheckCombinableNote x z (NoteFor (Text "!")) => Props (MetaTypes x) -> RevertableProperty (MetaTypes y) (MetaTypes z) -> Props (MetaTypes (Combine x z)) infixl 1 Source #

Adds a property in reverted form.