anchor.diff:  
   -include("../include/yang_types.hrl").
   
  +-record(mod, {prefix,
  +	      module,
  +	      typedefs = [],
  +	      imports = orddict:new(),
  +	      data = []}).
  +
   %-define(debug, true).
   
   -ifdef(debug).
  
positive.code: 	    [{cur, D}|Opts]
      end.
  
  expand([{Type,L,M,Data}], Opts) when Type==module; Type==submodule ->
      try begin
  	    {NewData, _Types} = expand_module(Data, M, Opts),
  	    {ok, [{Type,L,M,NewData}]}
  	end
      catch
  
negative.code: builtin_type(<<"union"              >>) -> true;
  builtin_type(_) -> false.
  
  expand_type(Type, L, #mod{module = M,
  			  prefix = OwnPfx,
  			  typedefs = Typedefs,
  			  imports = Imports}) ->
      case binary:split(Type, <<":">>) of
  	[OwnPfx, T] ->
  	    case lists:keyfind(T, 1, Typedefs) of
  		{_, {type,_,NewType,Def}} ->
  		    {NewType, Def};
  		false ->
  		    throw({unknown_type, [M, L, Type]})
  	    end;
  	[Pfx, T] ->
  	    case orddict:find(Pfx, Imports) of
  		{ok, {_, _, Types}} ->
  