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

Safe HaskellNone




data Info Source #

Information about a Host, which can be provided by its properties.

Many different types of data can be contained in the same Info value at the same time. See toInfo and fromInfo.


class (Typeable v, Monoid v, Show v) => IsInfo v where Source #

Values stored in Info must be members of this class.

This is used to avoid accidentially using other data types as info, especially type aliases which coud easily lead to bugs. We want a little bit of dynamic types here, but not too far..

Minimal complete definition



propagateInfo :: v -> Bool Source #

Should info of this type be propagated out of a container to its Host?

addInfo :: IsInfo v => Info -> v -> Info Source #

Any value in the IsInfo type class can be added to an Info.

toInfo :: IsInfo v => v -> Info Source #

Converts any value in the IsInfo type class into an Info, which is otherwise empty.

fromInfo :: IsInfo v => Info -> v Source #

mapInfo :: IsInfo v => (v -> v) -> Info -> Info Source #

Maps a function over all values stored in the Info that are of the appropriate type.

propagatableInfo :: Info -> Info Source #

Filters out parts of the Info that should not propagate out of a container.

data InfoVal v Source #

Use this to put a value in Info that is not a monoid. The last value set will be used. This info does not propagate out of a container.


InfoVal v 


Show v => Show (InfoVal v) Source # 


showsPrec :: Int -> InfoVal v -> ShowS #

show :: InfoVal v -> String #

showList :: [InfoVal v] -> ShowS #

Monoid (InfoVal v) Source # 


mempty :: InfoVal v #

mappend :: InfoVal v -> InfoVal v -> InfoVal v #

mconcat :: [InfoVal v] -> InfoVal v #

(Typeable * v, Show v) => IsInfo (InfoVal v) Source # 

class Typeable k a #

The class Typeable allows a concrete representation of a type to be calculated.

Minimal complete definition