anchor.diff:       [{tuple, 1, [{atom, 1, error}, {atom, 1, no_matching_hook_found}]}]
       }.
   
  -all_clauses(I, [{Name, _, _, Arity} = Hook |Rest], Acc, Info) ->
  -    Hooks = [H || {N, _, _, A} = H <- Rest,
  +all_clauses(I, [#hook{name = Name, arity = Arity} = Hook |Rest], Acc, Info) ->
  +    Hooks = [H || #hook{name = N, arity = A} = H <- Rest,
                     (N == Name) and (A == Arity)],
       Clause =
       clause(I, Name, Arity,
  
positive.code:     {clause, 1,
       [{atom, 1, only}],
       [],
       [list_const(true, Hooks)]
      }.
  info_all_clause(Hooks) ->
      {clause, 2,
       [{atom, 1, all}],
       [],
       [list_const(true, Hooks)]
      }.
  
  only_clauses(I, [{Name, _, _, Arity} | Rest], {Name, Arity} = Last, Acc, Info) ->
      %% we already serve this only-clause
      %% see head of Acc
      only_clauses(I, Rest, Last, Acc, Info);
  only_clauses(I, [{Name, Module, Fun, Arity} = Hook | Rest], _, Acc, Info) ->
      Clause =
      clause(I, Name, Arity,
             [{call, 1, {atom, 1, apply},
  
negative.code:        {atom, 1, Fun},
         {integer, 1, Arity}]
       }, list_const(true, Rest)}.
  
  -spec embed_hooks([hook()]) -> [raw_hook()].
  embed_hooks(Hooks) ->
      lists:map(
        fun(#hook{name = N, module = M,
                  function = F, arity = A}) ->
                {N, M, F, A}
        end, Hooks).
  
  -ifdef(TEST).
  %%%===================================================================
  