Safe Haskell | None |
---|---|
Language | Haskell98 |
- data Info
- class (Typeable v, Monoid v, Show v) => IsInfo v where
- addInfo :: IsInfo v => Info -> v -> Info
- toInfo :: IsInfo v => v -> Info
- fromInfo :: IsInfo v => Info -> v
- mapInfo :: IsInfo v => (v -> v) -> Info -> Info
- propagatableInfo :: Info -> Info
- data InfoVal v
- fromInfoVal :: InfoVal v -> Maybe v
- class Typeable k a
Documentation
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..
propagateInfo :: v -> Bool Source #
Should info of this type be propagated out of a container to its Host?
IsInfo NamedConfMap Source # | |
IsInfo DnsInfo Source # | DNS Info is propagated, so that eg, aliases of a container are reflected in the dns for the host where it runs. |
IsInfo AliasesInfo Source # | |
IsInfo PrivInfo Source # | |
IsInfo PkgUpgrade Source # | |
IsInfo PkgUpdate Source # | |
IsInfo PoudriereConfigured Source # | |
IsInfo ChrootInfo Source # | |
IsInfo DockerInfo Source # | |
(Typeable * v, Show v) => IsInfo (InfoVal v) Source # | |
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.
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.
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.
fromInfoVal :: InfoVal v -> Maybe v Source #