objective-0.6.3.2: Extensible objects

Copyright(c) Fumiaki Kinoshita 2014
LicenseBSD3
MaintainerFumiaki Kinoshita <fumiexcel@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Control.Monad.Objective.Class

Description

MonadObjective class and operations

Synopsis

Documentation

type Inst' f g = Inst g f g Source

class Monad b => ObjectiveBase b where Source

Associated Types

data Inst b f g Source

type InstOf b o :: * Source

Methods

new :: Object f g -> b (Inst b f g) Source

invoke :: Monad m => (forall x. b x -> m x) -> (forall x. g x -> m x) -> Inst b f g -> f a -> m a Source

(.-) :: (MonadObjective b m, Elevate g m) => Inst b f g -> f a -> m a infixr 3 Source

(.^) :: (MonadObjective b m, Elevate g m, Elevate e f) => Inst b f g -> e a -> m a infixr 3 Source

Invoke a method.

(.&) :: (MonadObjective b m, Elevate g m, Elevate (State s) f) => Inst b f g -> StateT s m a -> m a infixr 3 Source

(.^) for StateT

(.!) :: (MonadObjective b m, Elevate g m) => Inst b f g -> Program f a -> m a infixr 3 Source

invocation :: (MonadObjective b m, Elevate g m) => Inst b f g -> Object f m Source

We can convert method invocation into an object trivially. invocation i = liftO (i.-)