Copyright | (c) Fumiaki Kinoshita 2014 |
---|---|
License | BSD3 |
Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
MonadObjective
class and operations
- type Inst' f g = Inst g f g
- class Monad b => ObjectiveBase b where
- type MonadObjective b m = (ObjectiveBase b, Elevate b m, Monad m)
- (.-) :: (MonadObjective b m, Elevate g m) => Inst b f g -> f a -> m a
- (.^) :: (MonadObjective b m, Elevate g m, Elevate e f) => Inst b f g -> e a -> m a
- (.&) :: (MonadObjective b m, Elevate g m, Elevate (State s) f) => Inst b f g -> StateT s m a -> m a
- (.!) :: (MonadObjective b m, Elevate g m) => Inst b f g -> Program f a -> m a
- invocation :: (MonadObjective b m, Elevate g m) => Inst b f g -> Object f m
Documentation
class Monad b => ObjectiveBase b where Source
type MonadObjective b m = (ObjectiveBase b, Elevate b m, Monad m) Source
(.-) :: (MonadObjective b m, Elevate g m) => Inst b f g -> f a -> m a infix 3 Source
(.^) :: (MonadObjective b m, Elevate g m, Elevate e f) => Inst b f g -> e a -> m a infix 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 infix 3 Source
(.^) for StateT
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.-)