Safe HaskellSafe-Infered

AOP.Internal.Advice

Synopsis

Documentation

type Advice m a b = (a -> m b) -> a -> m b

apply_adv :: Advice m a b -> t2 -> t2

Coerces t2 to be compatible with the advice. It passes t1 as a the proceed argument of the advice. This coercion is safe, as described in Section 4 of the paper.

replace :: Replace m a b -> Advice m a b

augment :: Monad m => Augment a b c m -> Advice m a b

narrow :: Monad m => Narrow a b c m -> Advice m a b

before :: Monad m => (a -> m a1) -> Advice m a b

after :: Monad m => (a -> b -> m ()) -> Advice m a b

type Narrow a b c m = (a -> m Bool, (a -> m c, a -> b -> c -> m ()), Replace m a b)