anchor.diff:      case Def of
           ['lambda'|_] -> {yes,add_mbinding(Name, Def, Env),St};
           ['match-lambda'|_] -> {yes,add_mbinding(Name, Def, Env),St};
  -        _ -> {no,add_error({bad_form,macro}, St)}
  +        _ -> no
       end.
   
   %% add_error(Error, State) -> State.
  
positive.code: %% -compile([export_all]).
  
  -import(lfe_env, [new/0,add_fbinding/4,is_fbound/3,
                    add_mbinding/3,is_mbound/2,get_mbinding/2]).
  
  -import(lfe_lib, [is_symb_list/1,is_proper_list/1]).
  
  
negative.code:             {F1,Env,St1}
      end.
  
  %% pass_ewc(Forms, Env, State) -> {Env,State}.
  %%  Pass over the list of forms which evaluate at compile
  %%  time. Function and macro definitions are collected in the
  %%  environment and other experssions are evaluated. The shell set
  %%  forms are also specially recognised and the variables are bound
  %%  and kept in the environment as well. The functions and macrso
  %%  behave as in the shell.
  
  pass_ewc(Fs, Env, St) ->
      foldl(fun (F, {E,S}) -> pass_ewc_form(F, E, S) end, {Env,St}, Fs).
  
  pass_ewc_form(['progn'|Pfs0], Env0, St0) ->
      pass_ewc(Pfs0, Env0, St0);
  pass_ewc_form(['eval-when-compile'|Ewcs0], Env0, St0) ->
      pass_ewc(Ewcs0, Env0, St0);
  pass_ewc_form(['define-macro'|Def], Env0, St0) ->
      case pass_define_macro(Def, Env0, St0) of
          {yes,Env1,St1} -> {Env1,St1};
          no ->
  	    St1 = add_error({bad_env_form,macro}, St0),
  	    {Env0,St1}
      end;
  pass_ewc_form(['define-function',Name,Def], Env0, St0) ->
      case function_arity(Def) of
          {yes,Ar} ->                             %Definition not too bad
              Env1 = lfe_eval:add_dynamic_func(Name, Ar, Def, Env0),
              {Env1,St0};
          no ->                                   %Definition really bad
              St1 = add_error({bad_env_form,function}, St0),
              {Env0,St1}
      end;
  pass_ewc_form([set,Pattern|Es], Env, St) ->
      pass_eval_set(Pattern, Es, Env, St);
  pass_ewc_form(F, Env0, St0) ->
      %% First expand enough to test top form, if so process again.
      case pass_expand_expr(F, Env0, St0, false) of
          {yes,Exp,St1} ->                        %Top form expanded
              pass_ewc_form(Exp, Env0, St1);
          {no,F1,St1} ->                          %Not expanded
  	    case pass_eval_expr(F1, Env0, St1) of
  		{error,E} ->
  		    {Env0,add_error({bad_env_form,{expression,E}}, St1)};
  		_ -> {Env0,St1}			%Ignore value
  	    end
      end.
  
  function_arity([lambda,Args|_]) ->
      case is_symb_list(Args) of
          true -> {yes,length(Args)};
          false -> no
      end;
  function_arity(['match-lambda',[Pat|_]|_]) ->
      case is_proper_list(Pat) of
          true -> {yes,length(Pat)};
          false -> no
      end;
  function_arity(_) -> no.
  
  %% pass_eval_expr(Expr, Env, State) -> {ok,Value} | {error,Reason}.
  %%  Evaluate Expr inside Env and catch and return errors.
  
  pass_eval_expr(E, Env, _) ->
      try
  	{ok,lfe_eval:expr(E, Env)}
      catch
  	error:Error -> {error,Error};
  	exit:Exit -> {error,{exit,Exit}};
  	throw:_ -> {error,nocatch}
      end.
  
  %% pass_eval_set(Pattern, Body, Env, State) -> {Env,State}.
  %%  Evaluate the set form.
  
  pass_eval_set(P0, B0, Env0, St0) ->
      Match = case exp_form(['let',P0|B0], Env0, St0) of
  		{['let',P1,E],St1} ->
  		    pass_eval_set_1(P1, [], E, Env0, St1);
  		{['let',P1,G,E],St1} ->
  		    pass_eval_set_1(P1, [G], E, Env0, St1);
  		_ -> St1 = St0, error
  	    end,
      case Match of
  	{yes,_,Bs} ->
  	    Env1 = foldl(fun ({N,V}, E) -> add_vbinding(N, V, E) end, Env0, Bs),
  	    {Env1,St1};
  	_ ->					%No match or error
  	    {Env0,add_error({bad_env_form,'set'}, St1)}
      end.
  
  pass_eval_set_1(P, B, E, Env, St) ->
      case pass_eval_expr(E, Env, St) of
  	{ok,Val} ->
  	    lfe_eval:match_when(P, Val, B, Env);
  	{error,_}=Error -> Error
      end.
  
  %% pass_expand_expr(Expr, Env, State, ExpandFlag) ->
  %%     {yes,Exp,State} | {no,State}.
  