Safe HaskellSafe-Infered

AOP.Internal.Advice

Synopsis

Documentation

type Advice a = a -> a

apply_adv :: Advice t1 -> 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 s -> Advice s

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

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

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

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

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