Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Documentation
Information about a Host, which can be provided by its properties.
class (Typeable v, Monoid 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..
propigateInfo :: v -> Bool Source
Should info of this type be propigated 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.
mapInfo :: IsInfo v => (v -> v) -> Info -> Info Source
Maps a function over all values stored in the Info that are of the appropriate type.
propigatableInfo :: Info -> Info Source
Filters out parts of the Info that should not propigate 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 propigate out of a container.
fromInfoVal :: InfoVal v -> Maybe v Source