references-0.3.0.1: Selectors for reading and updating data.

Safe HaskellNone
LanguageHaskell98

Control.Reference.InternalInterface

Description

An interface with references that can be used internally while generating instances for MMorph and tuple lens classes.

Only the public parts of Control.Reference.Representation are exported.

For creating a new interface with different generated elements, use this internal interface.

Synopsis

Documentation

bireference Source

Arguments

:: (RefMonads w r, RefMonads w' r') 
=> (s -> r a)

Getter

-> (b -> s -> w t)

Setter

-> ((a -> w b) -> s -> w t)

Updater

-> (a -> r' s)

Backward getter

-> (t -> a -> w' b)

Backward setter

-> ((s -> w' t) -> a -> w' b)

Backward updater

-> Reference w r w' r' s t a b 

reference Source

Arguments

:: RefMonads w r 
=> (s -> r a)

Getter

-> (b -> s -> w t)

Setter

-> ((a -> w b) -> s -> w t)

Updater

-> Reference w r MU MU s t a b 

Creates a reference.

referenceWithClose Source

Arguments

:: (Functor w, Applicative w, Monad w, Functor r, Applicative r, Monad r) 
=> (s -> r a)

Getter

-> (s -> r ())

Close after getting

-> (b -> s -> w t)

Setter

-> (s -> w ())

Close after setting

-> ((a -> w b) -> s -> w t)

Updater

-> (s -> w ())

Close after updating

-> Reference w r MU MU s t a b 

Creates a reference with explicit close operations that are executed after the data is accessed.