anchor.diff:  
   %% -compile(export_all).
   
  --import(lists, [member/2,keysearch/3,
  +-import(lists, [member/2,keysearch/3,filter/2,
   		all/2,map/2,foldl/3,foldr/3,mapfoldl/3,mapfoldr/3,
   		concat/1]).
   -import(ordsets, [add_element/2,is_element/2,from_list/1,union/2]).
  
positive.code: 
  %% erl_comp_opts(Options) -> Options.
  %%  Strip out report options and make sure erlang compiler returns
  %%  errors and warnings.
  
  erl_comp_opts([report|Os]) -> erl_comp_opts(Os);
  erl_comp_opts([report_warnings|Os]) -> erl_comp_opts(Os);
  erl_comp_opts([report_errors|Os]) -> erl_comp_opts(Os);
  erl_comp_opts([O|Os]) -> [O|erl_comp_opts(Os)];
  erl_comp_opts([]) -> [return].			%Ensure return!
  
  %% do_ok_return(Ret, Warnings, State) -> {ok,Mod,...}.
  %% do_error_return(Errors, Warnings, State) -> {error,...} | error.
  
negative.code: %%  The default output dir is the current directory unless an
  %%  explicit one has been given in the options.
  
  filenames(File, St) ->
      %% Test for explicit outdir.
      Odir = case keysearch(outdir, 1, St#comp.opts) of
  	       {value,{outdir,D}} -> D;
  	       false -> "."
  	   end,
      Dir = filename:dirname(File),
      Base = filename:basename(File, ".lfe"),
      Lfile = filename:join(Dir, Base ++ ".lfe"),
      Bfile = Base ++ ".beam",
      Cfile = Base ++ ".core",
      St#comp{base=Base,
  	    lfile=Lfile,
  	    odir=Odir,
  	    bfile=filename:join(Odir, Bfile),
  	    cfile=filename:join(Odir, Cfile)}.
  
  %% lfe_comp_opts(Opts, State) -> {Opts,State}.
  %%  Check options for target and return type
  %%  (to_core0/to_core/binary), trim options and set options in state.
  
  lfe_comp_opts(Opts, St) ->
      foldr(fun(to_core0, {Os,S}) -> {Os,S#comp{target=to_core0}};
  	     (to_core, {Os,S}) -> {Os,S#comp{target=to_core}};
  	     (binary, {Os,S}) -> {Os,S#comp{ret=value}};
  	     (value, {Os,S}) -> {Os,S#comp{ret=value}};
  	     (file, {Os,S}) -> {Os,S#comp{ret=file}};
  	     (beam, {Os,S}) -> {Os,S#comp{target=beam}};
  	     %% Some options we don't want here.
  	     ('P', Acc) -> Acc;
  	     ('E', Acc) -> Acc;
  	     %% These we pass through.
  	     (Opt, {Os,S}) -> {[Opt|Os],S}
  	  end, {[],St#comp{target=beam,ret=file}}, Opts).
  
  %% do_forms(Forms, State) ->
  %%      {ok,Core,Warnings,State} | {error,Errors,Warnings,State}.
  