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

Safe Haskell | None
Language | Haskell98

Propellor.Types.Info

Synopsis

- newtype Info = Info [InfoEntry]
- data InfoEntry where
  - InfoEntry :: (IsInfo v, Typeable v) => v -> InfoEntry
- class (Typeable v, Monoid v, Show v) => IsInfo v where
- data PropagateInfo
  - = PropagateInfo Bool
  - | PropagatePrivData
- addInfo :: IsInfo v => Info -> v -> Info
- toInfo :: IsInfo v => v -> Info
- fromInfo :: IsInfo v => Info -> v
- mapInfo :: IsInfo v => (v -> v) -> Info -> Info
- data InfoVal v
  - = NoInfoVal
  - | InfoVal v
- fromInfoVal :: InfoVal v -> Maybe v
- class Typeable k a

# Documentation

newtype 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`.

Constructors

Info [InfoEntry] |

Instances

Show Info Source # |
Methods showsPrec :: Int -> Info -> ShowS show :: Info -> String showList :: [Info] -> ShowS
Monoid Info Source # |
Methods mempty :: Info mappend :: Info -> Info -> Info mconcat :: [Info] -> Info

data InfoEntry where Source #

Constructors

InfoEntry :: (IsInfo v, Typeable v) => v -> InfoEntry |

Instances

Show InfoEntry Source # |
Methods showsPrec :: Int -> InfoEntry -> ShowS show :: InfoEntry -> String showList :: [InfoEntry] -> ShowS

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

Methods

propagateInfo :: v -> PropagateInfo Source #

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

Instances

IsInfo NamedConfMap Source # |
Methods propagateInfo :: NamedConfMap -> PropagateInfo Source #
IsInfo DnsInfoUnpropagated Source # |
Methods propagateInfo :: DnsInfoUnpropagated -> PropagateInfo Source #
IsInfo DnsInfoPropagated Source # |
Methods propagateInfo :: DnsInfoPropagated -> PropagateInfo Source #
IsInfo AliasesInfo Source # |
Methods propagateInfo :: AliasesInfo -> PropagateInfo Source #
IsInfo ChrootInfo Source # |
Methods propagateInfo :: ChrootInfo -> PropagateInfo Source #
IsInfo DockerInfo Source # |
Methods propagateInfo :: DockerInfo -> PropagateInfo Source #
IsInfo PrivInfo Source # |
Methods propagateInfo :: PrivInfo -> PropagateInfo Source #
IsInfo PkgUpgrade Source # |
Methods propagateInfo :: PkgUpgrade -> PropagateInfo Source #
IsInfo PkgUpdate Source # |
Methods propagateInfo :: PkgUpdate -> PropagateInfo Source #
IsInfo PartInfo Source # |
Methods propagateInfo :: PartInfo -> PropagateInfo Source #
IsInfo PoudriereConfigured Source # |
Methods propagateInfo :: PoudriereConfigured -> PropagateInfo Source #
IsInfo [BootloaderInstalled] Source # |
Methods propagateInfo :: [BootloaderInstalled] -> PropagateInfo Source #
(Typeable * v, Show v) => IsInfo (InfoVal v) Source # |
Methods propagateInfo :: InfoVal v -> PropagateInfo Source #

data PropagateInfo Source #

Constructors

PropagateInfo Bool |
PropagatePrivData | Info about PrivData generally will be propigated even in cases where other Info is not, so it treated specially.

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.

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.

Constructors

NoInfoVal |
InfoVal v |

Instances

Show v => Show (InfoVal v) Source # |
Methods showsPrec :: Int -> InfoVal v -> ShowS show :: InfoVal v -> String showList :: [InfoVal v] -> ShowS
Monoid (InfoVal v) Source # |
Methods mempty :: InfoVal v mappend :: InfoVal v -> InfoVal v -> InfoVal v mconcat :: [InfoVal v] -> InfoVal v
(Typeable * v, Show v) => IsInfo (InfoVal v) Source # |
Methods propagateInfo :: InfoVal v -> PropagateInfo Source #

fromInfoVal :: InfoVal v -> Maybe v Source #

class Typeable k a #

Minimal complete definition

typeRep#