anchor.diff:  -import(lfe_env, [new/0,add_env/2,
                     add_vbinding/3,add_vbindings/2,is_vbound/2,get_vbinding/2,
                     fetch_vbinding/2,del_vbinding/2,
  -                  add_fbinding/4,add_fbindings/3,get_fbinding/3,add_ibinding/5,
  +                  add_fbinding/4,add_fbindings/2,get_fbinding/3,add_ibinding/5,
                     get_gbinding/3,add_mbinding/3]).
   
   -import(orddict, [store/3,find/2]).
  
positive.code:             {error,St1}
      end.
  
  slurp_1(Name, Ce) ->
      case slurp_file(Name) of                    %Parse, expand and lint file
          {ok,Fs,Fenv0,Ws} ->
              slurp_warnings(Name, Ws),
              Sl0 = #slurp{mod='-no-mod-',imps=[]},
              {Fbs,Sl1} = lfe_lib:proc_forms(fun collect_form/3, Fs, Sl0),
              %% Add imports to environment.
              Fenv1 = foldl(fun ({M,Is}, Env) ->
                                    foldl(fun ({{F,A},R}, E) ->
                                                  add_ibinding(M, F, A, R, E)
                                          end, Env, Is)
                            end, Fenv0, Sl1#slurp.imps),
              %% Get a new environment with all functions defined.
              Fenv2 = lfe_eval:make_letrec_env(Fbs, Fenv1),
              {ok,Sl1#slurp.mod,add_env(Fenv2, Ce)};
          {error,Es,Ws} ->
              slurp_errors(Name, Es),
              slurp_warnings(Name, Ws),
  
negative.code:             list_errors(Es),
              list_warnings(Ws)
      end,
      set_1(Epat, Rest, St).
  
  set_1(Pat, [['when'|_]=G,Exp], St) ->
      set_1(Pat, [G], Exp, St);                   %Just the guard
  set_1(Pat, [Exp], St) ->
      set_1(Pat, [], Exp, St);                    %Empty body
  set_1(_, _, _) -> erlang:error({bad_form,'set'}).
  
  set_1(Pat, Guard, Exp, #state{curr=Ce0}=St) ->
      Val = lfe_eval:expr(Exp, Ce0),              %Evaluate expression
      case lfe_eval:match_when(Pat, Val, Guard, Ce0) of
          {yes,_,Bs} ->
              Ce1 = foldl(fun ({N,V}, E) -> add_vbinding(N, V, E) end,
                          Ce0, Bs),
              {Val,St#state{curr=Ce1}};
          no -> erlang:error({badmatch,Val})
      end.
  
  %% unslurp(State) -> {ok,State}.
  %% slurp(File, State) -> {{ok,Mod},State}.
  %%  Load in a file making all functions available. We call the
  %%  compiler directly and only add defined functions, macros are
  %%  lost. Any exported macros will be available in the
  %%  LFE-EXPAND-USER-MACRO/2 function.
  
  -record(slurp, {mod,imps=[]}).                  %For slurping
  
  