anchor.diff:      Dir = filename:dirname(YangFile),
       case read(YangFile, Ext = filename:extension(YangFile), Opts) of
   	{{ok, Y}, Ext} ->
  -	    each_module(fun to_json_rpc/3, Y, {Dir, Ext, Opts});
  +	    with_module(fun to_json_rpc/3, Y, {Dir, Ext, Opts});
   	{Error, _} ->
   	    Error
       end.
  +
  +hrl(YangFile, HrlFile) ->
  +    hrl(YangFile, HrlFile, []).
  +
  +hrl(YangFile, HrlFile, Opts) ->
  +    [{module, M, RPCs}] = json_rpc(YangFile, Opts),
  +    Forms = to_hrl_forms(RPCs, M),
  +    write_hrl(HrlFile, Forms, Opts).
  +
  +write_hrl(_HrlFile, _Forms, _Opts) ->
  +    error(nyi).
   
   read(F) ->
       read(F, filename:extension(F), []).
  
positive.code:     case lists:keyfind(type, 1, Is) of
  	false ->
  	    undefined;
  	{type, _, T, _} = Type ->
  	    case binary:split(T, <<":">>) of
  		[Pfx, Ts] ->
  		    ImpData = orddict:fetch(Pfx, Imports),
  		    case [D1 || {typedef,_,T1,D1} <- ImpData, Ts == T1] of
  			[Def] ->
  			    type(Def, ImpData, Imports);
  			[] ->
  			    Type
  
negative.code: rpc_params([{anyxml,_,N,Is}|T], Data, Imports) ->
      [{binary_to_list(N), "", descr(Is), anyxml}
       | rpc_params(T, Data, Imports)];
  rpc_params([{leaf_list,_,N,Items}|T], Data, Is) ->
      L = binary_to_list(N),
      [{L, {array, [{L, "", descr(Items), type(Items, Data, Is)}]},
        descr(Items), type(Items, Data, Is)}
       | rpc_params(T, Data, Is)];
  rpc_params([{list,_,N,Items}|T], Data, Is) ->
      [{binary_to_list(N), {array, [{struct, rpc_params(Items, Data, Is)}]},
        descr(Items), type(Items, Data, Is)}
       | rpc_params(T, Data, Is)];
  rpc_params([{container,_,N,Items}|T], Data, Is) ->
      [{binary_to_list(N), {struct, rpc_params(Items, Data, Is)},
        descr(Items), type(Items, Data, Is)}
       | rpc_params(T, Data, Is)];
  rpc_params([_|T], Data, Is) ->
      rpc_params(T, Data, Is);
  rpc_params([], _, _) ->
      [].
  
  log_meta(Params, Info) ->
      [{'$meta', Info}|Params].
  
  markdown(File, JSON) ->
      case file:open(File, [write]) of
  