anchor.diff:  typeref(Type, _Mod) ->
       io_lib:format("~p()", [Type]).
   
  +ubf_contract(Mod, FileName) ->
  +    Contract = ubf_contract(Mod),
  +    file:write_file(FileName, Contract).
  +
  +ubf_contract(Mod) when is_list(Mod) ->
  +    ubf_contract(list_to_atom(Mod));
   ubf_contract(Mod) ->
       X0 = [""
             , "///"
  
positive.code: -module(jsf_utils).
  -include("ubf.hrl").
  
  -export([ubf_contract/1]).
  
  get_type(Name,Mod) ->
      get_type(Name,true,Mod).
  
  get_type(Name,Strict,Mod) ->
      case lists:keysearch(Name,1,Mod:contract_types()) of
          {value,Type} ->
              Type;
          false ->
              if Strict ->
                      exit({undefined_ubf_type,Name});
  
negative.code: typeref({record,Name,Elements},Mod) when is_atom(Name) ->
      Values = tl(tl(Elements)),
      RecordKey = {Name,length(Elements)-2},
      Fields = Mod:contract_record(RecordKey),
      io_lib:format("{\"$R\" : \"~p\", ~s}",
                    [Name, join([ io_lib:format("\"~p\" : ~s", [Field, typeref(Element, Mod)])
                                  || {Field,Element} <- lists:zip(Fields,Values) ], ", ")]);
  