Safe HaskellSafe-Infered

AOP.Internal.AOT

Synopsis

Documentation

data AOT m a

This module defines the AOT type. It is a separate module to avoid circular dependencies between modules.

Instances

MonadTrans AOT 
MonadState s m => MonadState s (AOT m) 
MonadWriter w m => MonadWriter w (AOT m) 
MonadReader r m => MonadReader r (AOT m) 
MonadError s m => MonadError s (AOT m) 
Typeable1Monad m => OpenApp (->) (AOT m)

Every regular functions is tagged with the same default tag.

Typeable1Monad m => OpenApp Function (AOT m)

Function is a wrapper to add a notion of identity based on tags.

Monad m => Monad (AOT m)

Monadic bind and return operations for a transformed monad. The aspect environment is wrapped or passed around as in a state monad transformer.

Typeable1Monad m => Typeable1 (AOT m)

Typeable instance so types of computations in AOT can be compared (like in pcCall and pcType)

(MonadEL m, Typeable1Monad (AOT m)) => MonadEL (AOT m)

Interaction with AOT

MonadIO m => MonadIO (AOT m) 
MonadCont m => MonadCont (AOT m) 
(Typeable1Monad m, MonadDeploy m) => AOPMonad (AOT m)

The semantics of aspect deployment are defined in the | MonadDeploy typeclass. AOT assumes it is on top of an MonadDeploy | instance, and uses that functions for aspect deployment.

runAOT :: Monad m => AOT m a -> m a

Runs an AOT computation to obtain a computation in the underlying monad

wappt :: (Typeable1Monad m, PolyTypeable (a -> AOT m b)) => (a -> AOT m b) -> FunctionTag -> a -> AOT m b

Implementation of woven application for AOT, used in the overloading of #. FunctionTag argument is used for function identity: Wrapped functions are equal when their tags are equal Regular functions share the same tag, and are compared using StableNames.