Stability | experimental |
---|---|
Maintainer | woozletoff@gmail.com |
Safe Haskell | None |
This module reexports publicly available means to communicate between different plugins (or more generally threads running in the same plugin provider).
- data SomeMessage = forall msg . Message msg => SomeMessage msg
- fromMessage :: Message message => SomeMessage -> Maybe message
Documentation
data SomeMessage Source
Taken from xmonad and based on ideas in /An Extensible Dynamically-Typed Hierarchy of Exceptions/, Simon Marlow, 2006.
User-extensible messages must be put into a value of this type, so that it can be sent to other plugins.
forall msg . Message msg => SomeMessage msg |
fromMessage :: Message message => SomeMessage -> Maybe messageSource
Try to convert a given message to a value of the message type we are
interested in. Will evaluate to Nothing
for any other type.