| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
BishBosh.Property.Switchable
Contents
Description
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.
Methods
Arguments
| :: IO a | Returns a switch in the on state, regardless of any previous state. |
Arguments
| :: a | |
| -> IO a | Switch the binary state. |
Arguments
| :: a | |
| -> IO a | Turn the switch off, which has no effect if already in the off state. |
Arguments
| :: a | |
| -> Bool | Predicate: whether the switch is currently in the on state. |
Arguments
| :: a | |
| -> Bool | Predicate: whether the switch is currently in the off state. |