Copyright | (c) Sebastian Witte |
---|---|
License | Apache-2.0 |
Maintainer | woozletoff@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
This module reexports publicly available means to communicate between different plugins (or more generally threads running in the same plugin provider).
- data SomeMessage = 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.
Message msg => SomeMessage msg |
fromMessage :: Message message => SomeMessage -> Maybe message Source #
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.