anchor.diff:  -spec h(module(), fname(), arity()) -> ok.
   h(Mod, Fun, Arity) ->
       F = fun (Docs) ->
  -                {docs, FunDocs} = lists:keyfind(docs, 1, Docs),
  -                {specs, Specs} = lists:keyfind(specs, 1, Docs),
  -                FA = {Fun, Arity},
  -                %% TODO: fragile
  -                {FA,_,_,_,Doc} = lists:keyfind(FA, 1, FunDocs),
  -                {FA,Spec} = lists:keyfind(FA, 1, Specs),
  -                io_lib:format("~s~n~s", [Spec, Doc])
  +                case {lists:keyfind(docs, 1, Docs),
  +                      lists:keyfind(specs, 1, Docs)} of
  +                    {false, false} -> error({no_docs, <<"neither docs nor specs found">>});
  +                    {false, {_, Specs}}     -> format({Fun, Arity}, no_docs, Specs);
  +                    {{_, Docs}, false}      -> format({Fun, Arity}, Docs, no_specs);
  +                    {{_, Docs}, {_, Specs}} -> format({Fun, Arity}, Docs, Specs)
  +                end
           end,
       guard_no_docs(Mod, F).
   
  
positive.code:         {ok, {Mod, [{"ExDc", BExDc}]}} ->
              erlang:binary_to_term(BExDc);
          {error, _, {missing_chunk, _, _}} ->
              error(no_exdc)
      end.
  
negative.code: guard_not_supported(_, _) ->
      <<"Documentation format not supported">>.
  
  format(FunArity, no_docs, Specs) ->
      {FunArity, Spec} = lists:keyfind(FunArity, 1, Specs),
      io_lib:format("~s", [Spec]);
  format(FunArity, Docs, no_specs) ->
      {FunArity, _, _, _, Doc} = lists:keyfind(FunArity, 1, Docs),
      io_lib:format("~s", [Doc]);
  format(FunArity, Docs, Specs) ->
      {FunArity, _, _, _, Doc} = lists:keyfind(FunArity, 1, Docs),
      {FunArity, Spec} = lists:keyfind(FunArity, 1, Specs),
      io_lib:format("~s~n~s", [Spec, Doc]).
  
  types(Docs) ->
      Types = proplists:get_value(types, Docs, []),
      [ ["\n", Desc] || {{_Name, _Arity}, Desc} <- Types ].
  