references-0.3.3.1: Selectors for reading and updating data.

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

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

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.

Arguments

 :: RefMonads w 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.