Idris2Doc : Data.Linear.Ref1

Data.Linear.Ref1

(source)

Reexports

importpublic Data.Linear.Token

Definitions

dataRef : Type->Type->Type
  A linear mutable reference

Totality: total
Visibility: export
Constructor: 
R1 : Muta->Refsa
0IORef : Type->Type
  Alias for `Ref RIO`

Totality: total
Visibility: public export
ref1 : a->F1s (Refsa)
  Creates a new mutable reference tagged with `tag` and holding
initial value `v`.

Totality: total
Visibility: export
newref : Lift1sf=>a->f (Refsa)
  

Totality: total
Visibility: export
=DEPRECATED=
newIORef : HasIOio=>a->io (IORefa)
  Creates a mutable reference in `IO` land.

Deprecated: Use `newref` instead

Totality: total
Visibility: export
read1 : Refsa->F1sa
  Reads the current value at a mutable reference tagged with `tag`.

Totality: total
Visibility: export
readref : Lift1sf=>Refsa->fa
  Convenience alias for `runIO $ read1 r` for reading a reference in
`IO`.

Totality: total
Visibility: export
write1 : Refsa->a->F1's
  Updates the mutable reference tagged with `tag`.

Totality: total
Visibility: export
writeref : Lift1sf=>Refsa->a->f ()
  Convenience alias for `runIO $ write1 r v` for writing to a reference in
`IO`.

Totality: total
Visibility: export
caswrite1 : Refsa->a->a->F1sBool
  Atomically writes `val` to the mutable reference if its current
value is equal to `pre`.

This is supported and has been tested on the Chez and Racket backends.
It trivially works on the JavaScript backends, which are single-threaded
anyway.

Totality: total
Visibility: export
casswap1 : Refsa->a->F1's
  Atomic overwrite of a mutable reference using a CAS-loop
internally

This is supported and has been tested on the Chez and Racket backends.
It trivially works on the JavaScript backends, which are single-threaded
anyway.

Totality: total
Visibility: export
casupdate1 : Refsa-> (a-> (a, b)) ->F1sb
  Atomic modification of a mutable reference using a CAS-loop
internally

This is supported and has been tested on the Chez and Racket backends.
It trivially works on the JavaScript backends, which are single-threaded
anyway.

Totality: total
Visibility: export
update : Lift1sf=>Refsa-> (a-> (a, b)) ->fb
  Atomically updates and reads a mutable reference in `IO`.

This uses `casupdate1` internally.

Totality: total
Visibility: export
casmod1 : Refsa-> (a->a) ->F1's
  Atomic modification of a mutable reference using a CAS-loop
internally

This is supported and has been tested on the Chez and Racket backends.
It trivially works on the JavaScript backends, which are single-threaded
anyway.

Totality: total
Visibility: export
mod1 : Refsa-> (a->a) ->F1's
  Modifies the value stored in mutable reference tagged with `tag`.

Totality: total
Visibility: export
mod : Lift1sf=>Refsa-> (a->a) ->f ()
  Atomically modifies a mutable reference in `IO`.

This uses `casmod1` internally.

Totality: total
Visibility: export
Fixity Declaration: infixl operator, level 9
modAndRead1 : Refsa-> (a->a) ->F1sa
  Modifies the value stored in mutable reference tagged with `tag`
and returns the updated value.

Totality: total
Visibility: export
readAndMod1 : Refsa-> (a->a) ->F1sa
  Modifies the value stored in mutable reference tagged with `tag`
and returns the previous value.

Totality: total
Visibility: export
whenRef1 : RefsBool-> Lazy (F1's) ->F1's
  Runs the given stateful computation only when given boolean flag
is currently at `True`

Totality: total
Visibility: export
0WithRef1 : Type->Type->Type
  Alias for a function taking a linear mutable refernce as
an auto-implicit argument.

Totality: total
Visibility: public export
withRef1 : a->WithRef1ab->b
  Runs a function requiring a linear mutable reference.

Totality: total
Visibility: export