objective-1: Extensible objects

Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Object.Instance

Synopsis

Documentation

data Instance f g where Source

MVar-based instance

Constructors

InstRef :: MVar (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 

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

Invoke a method with an explicit landing function.

(.-) :: MonadIO m => Instance f m -> f a -> m a 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.