anchor.diff:  %%  module name.
   
   %% This just print the whole file structure.
  +split_pp(St) -> sexpr_pp(St, "split").
  +umac_pp(St) -> sexpr_pp(St, "umac").
   expand_pp(St) -> sexpr_pp(St, "expand").
  -%%umac_pp(St) -> sexpr_pp(St, "umac").
  -%%group_pp(St) -> sexpr_pp(St, "group").
   pmod_pp(St) -> sexpr_pp(St, "pmod").
   lint_pp(St) -> sexpr_pp(St, "lint").
   
  
positive.code:                            warnings=St#comp.warnings ++ Ws}}
      end.
  
  %% expand_pre_forms(Forms, State) ->
  %%     {PreForms,RestForms,Env,Warnings,State}.
  
  expand_pre_forms(Fs, Ci) ->
      St0 = lfe_macro:expand_form_init(Ci),
      Env0 = lfe_env:new(),
      expand_mod_forms(Fs, [], Env0, St0).
  
  %% expand_modules(Forms, PreForms, PreEnv, State) ->
  %%     {Modules,State}.
  %%  Collect and expand modules upto the end. Each module initially has
  %%  the pre environment and all pre forms are appended to it.
  
  expand_modules(Fs, PreFs, PreEnv, St) ->
      expand_modules(Fs, [], PreFs, PreEnv, St).
  
  expand_modules([{['define-module',Name|_],_}=Mdef|Fs0], Ms, PreFs, PreEnv, St0) ->
      %% Expand and collect all forms upto next define-module or end.
      {Mfs0,Fs1,Env,Mws,St1} = expand_mod_forms(Fs0, [], PreEnv, St0),
      {Mfs1,St2} = lfe_user_macros:module(Mdef, Mfs0 ++ PreFs, Env, St1),
      M = {ok,Name,Mfs1,Mws},
      expand_modules(Fs1, [M|Ms], PreFs, PreEnv, St2);
  expand_modules([], Ms, _PreFs, _PreEnv, St) ->
      {lists:reverse(Ms),St}.
  
  %% expand_mod_forms(Forms, Acc, Env, State) ->
  %%     {Modforms,RestForms,Env,Warnings,State}.
  %%  Expand and collect forms upto the next define-module or end. We
  %%  also flatten top-level nested progn code.
  
  expand_mod_forms([F0|Fs0], Acc, Env0, St0) ->
      case lfe_macro:expand_fileform(F0, Env0, St0) of
  	{{['define-module'|_],_}=F1,Env1,St1} ->
  	    Mfs = lists:reverse(Acc),
  	    {Mfs,[F1|Fs0],Env1,[],St1};
  	{{['progn'|Pfs],L},Env1,St1} ->		%Flatten progn's
  	    Fs1 = [ {F,L} || F <- Pfs ] ++ Fs0,
  	    expand_mod_forms(Fs1, Acc, Env1, St1);
  	{F1,Env1,St1} ->
  	    expand_mod_forms(Fs0, [F1|Acc], Env1, St1)
      end;
  expand_mod_forms([], Acc, Env, St) ->
      Mfs = lists:reverse(Acc),
      {Mfs,[],Env,[],St}.
  
  %% do_group_modules(State) -> {ok,State} | {error,State}.
  %% do_user_macros(State) -> {ok,State} | {error,State}.
  %% do_lfe_pmod(State) -> {ok,State} | {error,State}.
  %% do_lint(State) -> {ok,State} | {error,State}.
  %% do_lfe_codegen(State) -> {ok,State} | {error,State}.
  %% do_erl_comp(State) -> {ok,State} | {error,State}.
  %%  The actual compiler passes.
  
  %% do_group_modules(#comp{code=[{ok,_,Fs,_}]}=St) ->
  %%     Ms1 = case group_modules(Fs) of
  %% 	      [{ok,[],[{['define-module'|_],_}|_],[]}|_]=Ms0 -> Ms0;
  %% 	      [{ok,[],_,[]}|Ms0] -> Ms0
  %% 	  end,
  %%     {ok,St#comp{code=Ms1}}.
  
  %% do_user_macros(#comp{cinfo=Ci,code=Ms0}=St) ->
  %%     Umac = fun ({ok,_,Mfs0,Ws}) ->
  %%                    {Name,Mfs1} = lfe_user_macros:module(Mfs0, Ci),
  %%                    {ok,Name,Mfs1,Ws}
  %%            end,
  %%     Ms1 = lists:map(Umac, Ms0),
  %%     {ok,St#comp{code=Ms1}}.
  
  do_lfe_pmod(#comp{cinfo=Ci,code=Ms0}=St) ->
      Pmod = fun ({ok,_,Mfs0,Ws}) ->
  
negative.code: %%  Translate from LFE to erlang standard options for lfe compiler.
  
  lfe_comp_opts(Opts) ->
      Fun = fun ('to-split') -> to_split;
                ('to-umac') -> to_umac;
                ('to-exp') -> to_exp;
                ('to-pmod') -> to_pmod;
                ('to-lint') -> to_lint;
                ('to-core0') -> to_core0;
  