Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Defines a class to which IO data-types which can be switched between binary states, can conform.
Type-classes
class Switchable a where Source #
For data which operate like binary switches.
:: IO a | Returns a switch in the on state, regardless of any previous state. |
:: a | |
-> IO a | Switch the binary state. |
:: a | |
-> IO a | Turn the switch off, which has no effect if already in the off state. |
:: a | |
-> Bool | Predicate: whether the switch is currently in the on state. |
:: a | |
-> Bool | Predicate: whether the switch is currently in the off state. |