objective-1.0.3: Extensible objects

Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Object.Instance

Synopsis

Documentation

data Instance f g where Source

TMVar-based instance

Constructors

InstRef :: TMVar (Object f g) -> Instance f g 
InstLmap :: (forall x. f x -> g x) -> Instance g h -> Instance f h 
InstRmap :: Instance f g -> (forall x. g x -> h x) -> Instance f h 

invokeOn :: (MonadIO m, MonadMask m) => (forall x. g x -> m x) -> Instance f g -> f a -> m a Source

Invoke a method with an explicit landing function.

invokeOnSTM :: (forall x. g x -> STM x) -> Instance f g -> f a -> STM a Source

Invoke a method with an explicit landing function.

(..-) :: MonadSTM m => Instance f STM -> f a -> m a infixr 3 Source

Invoke a method, atomically.

(.-) :: (MonadIO m, MonadMask m) => Instance f m -> f a -> m a infixr 3 Source

Invoke a method.

new :: MonadIO m => Object f g -> m (Instance f g) Source

Create a new instance.

newSettle :: MonadIO m => Object f m -> m (Instance f m) Source

Create a new instance, having it sitting on the current environment.

newSTM :: Object f g -> STM (Instance f g) Source

Create a new instance.