Safe Haskell | None |
---|

- type FunctionTag = Integer
- defaultFunctionTag :: Integer
- data Jp m a b = (Typeable1Monad m, PolyTypeable (a -> m b)) => Jp (a -> m b) FunctionTag a TypeRep
- newjp :: (Typeable1Monad m, PolyTypeable (a -> m b)) => (a -> m b) -> FunctionTag -> a -> Jp m a b
- compareFun :: (Typeable1Monad m, PolyTypeable (a -> m b)) => t -> FunctionTag -> Jp m a b -> Bool
- compareType :: (Typeable1Monad m, PolyTypeable (a -> m b)) => TypeRep -> Jp m a b -> Bool
- getJpArg :: Monad m => Jp m a b -> a
- data PC m a b = PC {}
- runPC :: Monad m => PC m t t1 -> Jp m a' b' -> m Bool
- data RequirePC m a b = Typeable1Monad m => RequirePC {}
- type Advice m a b = (a -> m b) -> a -> m b
- applyAdv :: Advice m a b -> t2 -> t2
- data Aspect m a b c d = LessGen (a -> b) (c -> m d) => Aspect (PC m a b) (Advice m c d) AspectHandle
- aspect :: (Typeable1Monad m, LessGen (a1 -> b1) (a2 -> m b2)) => PC m a1 b1 -> Advice m a2 b2 -> Aspect m a1 b1 a2 b2
- deleteAsp :: Typeable1Monad m => EAspect m -> AspectEnv m -> AspectEnv m
- data EAspect m = forall a b c d . LessGen (a -> b) (c -> m d) => EAspect (Aspect m a b c d)
- type AspectEnv m = [EAspect m]

# Documentation

Join points

type FunctionTag = IntegerSource

Join points are function applications. We store the function and the argument, and the function type representation. | We add a FunctionTag value to use for quantification.

(Typeable1Monad m, PolyTypeable (a -> m b)) => Jp (a -> m b) FunctionTag a TypeRep |

newjp :: (Typeable1Monad m, PolyTypeable (a -> m b)) => (a -> m b) -> FunctionTag -> a -> Jp m a bSource

Creates a join point with given function, tag, and argument

compareFun :: (Typeable1Monad m, PolyTypeable (a -> m b)) => t -> FunctionTag -> Jp m a b -> BoolSource

Comparing identity of functions:

compareType :: (Typeable1Monad m, PolyTypeable (a -> m b)) => TypeRep -> Jp m a b -> BoolSource

Compare types to see if type representation t is less general | than the type of the function associated to the join point

A pointcut is a predicate on the current join point. It is used to identify join points of interest.

runPC :: Monad m => PC m t t1 -> Jp m a' b' -> m BoolSource

Extracts the computation resulting of applying a join point to the pointcut

A RequirePC is not a valid standalone pointcut, it reflects a type requirement and must be combined with a standard PC.

Typeable1Monad m => RequirePC | |

applyAdv :: Advice m a b -> t2 -> t2Source

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 the paper.

Typed first-class aspect. An aspect is tagged with a Unique value, used for identity

aspect :: (Typeable1Monad m, LessGen (a1 -> b1) (a2 -> m b2)) => PC m a1 b1 -> Advice m a2 b2 -> Aspect m a1 b1 a2 b2Source

Constructs a well-typed aspect

deleteAsp :: Typeable1Monad m => EAspect m -> AspectEnv m -> AspectEnv mSource

Deletes asp from the aspect environment, used in undeploy

Aspect with hidden types, to be used in the aspect environment

Typeable1Monad m => Eq (EAspect m) | Notion of aspect equality to delete aspects from the aspect environment |

Show (EAspect m) |