anchor.diff:  all_clauses(I, [], Acc, Info) ->
       {lists:reverse([not_found_clause(I) | Acc]), Info}.
   
  -
  -all_till_ok_clauses(I, [{Name, _, _, Arity} = Hook |Rest], Acc) ->
  -    Hooks = [H || {N, _, _, A} = H <- Rest,
  +all_till_ok_clauses(I, [#hook{name = Name, arity = Arity} = Hook |Rest], Acc) ->
  +    Hooks = [H || #hook{name = N, arity = A} = H <- Rest,
                     (N == Name) and (A == Arity)],
       Clause =
       clause(I, Name, Arity,
  
positive.code:                    atom(),
                     atom(),
                     non_neg_integer()}.
  
  %%%===================================================================
  %%% API
  
negative.code:         false -> {application, Name, Opts}
      end.
  
  plugins_have_hook({Name, Module, Fun, Arity}, OldPlugins) ->
      lists:any(
        fun(#hook{name = H, module = M,
                  function = F, arity = A}) ->
                {H,M,F,A} =:= {Name, Module, Fun, Arity}
        end,
        extract_hooks(OldPlugins)).
  
  