Îõ³h$ ›æ$      !"#0(c) Edward Kmett 2014-2019, Sven Panne 2009-2018BSD3 Sven Panne stableportableSafe 39>ÀÁÂÄÉרStateVar2This is the class of all readable state variables.StateVar3This is the class of all updatable state variables.StateVarÀTransform the contents of a state variable with a given funtion.StateVarThis is a variant of * which is strict in the transformed value.StateVar2This is the class of all writable state variables.StateVar(Write a new value into a state variable.StateVarâA concrete implementation of a read-only state variable is simply an IO action to read the value.StateVarèA concrete implementation of a write-only state variable, carrying an IO action to write the new value. StateVaròA concrete implementation of a readable and writable state variable, carrying one IO action to read the value and another IO action to write the new value. This data type represents a piece of mutable, imperative state with possible side-effects. These tend to encapsulate all sorts tricky behavior in external libraries, and may well throw exceptions. Inhabitants should" satsify the following properties:ÐIn the absence of concurrent mutation from other threads or a thrown exception: do x <-  v; v  y; v  x "should restore the previous state.-Ideally, in the absence of thrown exceptions: v  a >>  v should return a, regardless of a. In practice some  Ôs only permit a very limited range of value assignments, and do not report failure. StateVar Construct a  1 from two IO actions, one for reading and one for StateVarChange the type of a  StateVar Construct a  from an IO action for writing.StateVar Construct a  from an IO action.StateVarThis is a variant of ( which is strict in the value to be set. StateVargetterStateVarsetterStateVarsetterStateVargetter   2222$        !"#$%StateVar-1.2.1-7vo3tV8mPssJqOV48TU4OF Data.StateVar HasGetterget HasUpdate$~$~! HasSetter$=GettableStateVarSettableStateVarStateVar makeStateVar mapStateVarmakeSettableStateVarmakeGettableStateVar$=!$fContravariantSettableStateVar$fHasSetterForeignPtra$fHasSetterTVara$fHasSetterIORefa$fHasSetterPtra$fHasSetterStateVara$fHasSetterSettableStateVara$fHasGetterForeignPtra$fHasGetterIORefa$fHasGetterPtra$fHasGetterSTMa$fHasGetterIOa$fHasGetterTVara$fHasGetterStateVara$fHasUpdateForeignPtraa$fHasUpdateTVaraa$fHasUpdateIORefaa$fHasUpdatePtraa$fHasUpdateStateVaraa