Idris2Doc : Data.IORef

Data.IORef(source)

Definitions

dataIORef : Type->Type
Totality: total
Visibility: export
Constructor: 
MkRef : Muta->IORefa
newIORef : HasIOio=>a->io (IORefa)
  Create a new IORef.

Totality: total
Visibility: export
readIORef : HasIOio=>IORefa->ioa
  Read the value of an IORef.

Totality: total
Visibility: export
writeIORef : HasIOio=>IORefa->a->io ()
  Write a new value into an IORef.
This function does not create a memory barrier and can be reordered with other independent reads and writes within a thread,
which may cause issues for multithreaded execution.

Totality: total
Visibility: export
writeIORef1 : HasLinearIOio=>IORefa-> (1_ : a) ->io ()
  Write a new value into an IORef.
This function does not create a memory barrier and can be reordered with other independent reads and writes within a thread,
which may cause issues for multithreaded execution.

Totality: total
Visibility: export
modifyIORef : HasIOio=>IORefa-> (a->a) ->io ()
  Mutate the contents of an IORef, combining readIORef and writeIORef.
This is not an atomic update, consider using atomically when operating in a multithreaded environment.

Totality: total
Visibility: export
atomically : HasIOio=>Mutex->io () ->io ()
  This function atomically runs its argument according to the provided mutex.
It can for instance be used to modify the contents of an IORef `ref` with a function `f`
in a safe way in a multithreaded program by using `atomically lock (modifyIORef ref f)`
provided that other threads also rely on the same `lock` to modify `ref`.

Totality: total
Visibility: export