anchor.diff:  
   -module(lfe_macro_include).
   
  --export([file/3,lib/3,format_error/1]).
  -
  --export([trans_forms/1]).
  +-export([file/3,lib/3,format_error/1,stringify/1]).
   
   -compile([export_all]).
   
  
positive.code:     Ld = lfe_trans:from_expr(Def),
      [Fd,Ld].
  
  %% trans_macros(MacroDefs) -> Forms.
  %%  Translate macro definitions to LFE macro definitions. Ignore
  %%  undefined and predefined macros.
  
  trans_macros([{{atom,Mac},Defs}|Ms]) ->
      case trans_macro(Mac, Defs) of
  	[] -> trans_macros(Ms);			%No definition, ignore
  	Mdef -> [Mdef|trans_macros(Ms)]
      end;
  trans_macros([]) -> [].
  
  trans_macro(_, undefined) -> [];		%Undefined macros
  trans_macro(_, {none,_}) -> [];			%Predefined macros
  trans_macro(Mac, Defs) ->
      case trans_macro_defs(Defs) of
  	[] -> [];				%No definition
  	Lcls -> [defmacro,Mac|Lcls]
      end.
  
  %% trans_macro_defs(MacroDef) -> [] | [Clause].
  
  %%  Translate macro definition to a list of clauses. Put the no arg
  %%  version last as a catch all. Clash if macro has no arg definition
  %%  *and* function definition with no args:
  
negative.code: 
  %% parse_hrl_file(Forms, Macros, State) -> {ok,Forms,State} | {error,Error}.
  
  parse_hrl_file(Fs0, Ms0, St0) ->
      {Fs1,St1} = trans_forms(Fs0, St0),
      {Ms1,St2} = trans_macros(Ms0, St1),
      {ok,Fs1 ++ Ms1,St2}.
  
  %% trans_forms(Forms, State) -> {LForms,State}.
  %%  Translate the record and function defintions in the forms to LFE
  %%  record and function definitions. Ignore all type declarations and
  %%  other forms.
  
  trans_forms([{attribute,_,record,{Name,Fields}}|Fs], St0) ->
      {Lfs,St1} = trans_forms(Fs, St0),
      case catch {ok,trans_record(Name, Fields)} of
  	{ok,Lrec} -> {[Lrec|Lfs],St1};
  	{'EXIT',_} ->				%Something went wrong
  	    {Lfs,add_warning({notrans_record,Name}, St1)}
      end;
  trans_forms([{function,_,Name,Arity,Cls}|Fs], St0) ->
      {Lfs,St1} = trans_forms(Fs, St0),
      case catch {ok,trans_function(Name, Arity, Cls)} of
  	{ok,Lfunc} -> {[Lfunc|Lfs],St1};
  	{'EXIT',_} ->				%Something went wrong
  	    {Lfs,add_warning({notrans_function,Name,Arity}, St1)}
      end;
  trans_forms([{error,_}|Fs], St) ->		%What should we do with these?
      trans_forms(Fs, St);
  trans_forms([_|Fs], St) ->			%Ignore everything else
       trans_forms(Fs, St);
  trans_forms([], St) -> {[],St}.
  
  %% trans_record(Name, Fields) -> LRecDef.
  
  trans_record(Name, Fs) ->
      Lfs = record_fields(Fs),
      [defrecord,Name|Lfs].
  
  record_fields(Fs) ->
      [ record_field(F) || F <- Fs ].
  