Safe Haskell | None |
---|
- newtype BitDataM d a = BitDataM {
- runBitDataM :: State d a
- clear :: BitData d => BitDataM d ()
- setBit :: BitData d => BitDataField d Bit -> BitDataM d ()
- clearBit :: BitData d => BitDataField d Bit -> BitDataM d ()
- setField :: (BitData d, BitData b, SafeCast (BitDataRep b) (BitDataRep d)) => BitDataField d b -> b -> BitDataM d ()
- runBits :: BitData d => BitDataRep d -> BitDataM d a -> (a, BitDataRep d)
- withBits :: BitData d => BitDataRep d -> BitDataM d () -> BitDataRep d
- withBitsRef :: BitData d => Ref s1 (Stored (BitDataRep d)) -> BitDataM d a -> Ivory eff a
Documentation
An action that modifies a bit data value of type d and returns a a in the Ivory s r monad. Values of this type are passed as the body argument to withBits etc.
BitDataM | |
|
setBit :: BitData d => BitDataField d Bit -> BitDataM d ()Source
Set a single bit field in the current bit data value.
setField :: (BitData d, BitData b, SafeCast (BitDataRep b) (BitDataRep d)) => BitDataField d b -> b -> BitDataM d ()Source
Set a field to a value.
runBits :: BitData d => BitDataRep d -> BitDataM d a -> (a, BitDataRep d)Source
Execute a bitdata action given an initial value, returning the new bitdata value and the result of the action.
withBits :: BitData d => BitDataRep d -> BitDataM d () -> BitDataRep dSource
Execute a bitdata action given an initial value, returning the new bitdata value.
withBitsRef :: BitData d => Ref s1 (Stored (BitDataRep d)) -> BitDataM d a -> Ivory eff aSource
Execute a bit data action given a reference to a value, writing the resulting value back to the reference upon completion and returning the result of the action.