anchor.diff:  from_pat_list(Ps) -> [ from_pat(P) || P <- Ps ].
   
   %% to_vanilla(Sexp, LineNumber) -> AST.
  +%%  Convert an LFE sexpr to an vanilla AST. The only difficulty is the
  +%%  handling of variables in (let ...). We assume that all macros have
  +%%  been expanded EXCEPT lc which we need for QLC's.
   
   to_vanilla(S, L) ->
       %% Be very LOUD for the time being.
  -    case catch {ok,to_expr(S, L)} of
  +    case catch {ok,to_expr(S, L, new())} of
   	{ok,AST} -> AST;
   	Other ->
   	    io:format("BOOM: ~p\n", [Other]),
   	    error(Other)
       end.
   
  -%% to_expr(Expr, LineNumber) -> Expr.
  -
  -to_expr([], L) -> {nil,L};
  -to_expr(I, L) when is_integer(I) -> {integer,L,I};
  -to_expr(F, L) when is_float(F) -> {float,L,F};
  -to_expr(V, L) when is_atom(V) -> {var,L,V};	%Unquoted atom
  -to_expr(T, L) when is_tuple(T) ->
  -    {tuple,L,to_expr_list(tuple_to_list(T), L)};
  -to_expr(?Q(V), L) -> to_lit(V, L);
  -to_expr([cons,H,T], L) ->
  -    {cons,L,to_expr(H, L),to_expr(T, L)};
  -to_expr([car,E], L) -> {call,L,{atom,L,hd},[to_expr(E, L)]};
  -to_expr([cdr,E], L) -> {call,L,{atom,L,tl},[to_expr(E, L)]};
  -to_expr([list|Es], L) ->
  -    foldr(fun (E, T) -> {cons,L,to_expr(E, L),T} end, {nil,L}, Es);
  -to_expr(['list*'|Es], L) ->			%Macro
  -    to_list_s(Es, L, fun to_expr/2);
  -to_expr([tuple|Es], L) ->
  -    {tuple,L,to_expr_list(Es, L)};
  -to_expr([binary|Segs], L) ->
  -    {bin,L,to_bitsegs(Segs, L)};
  +%% to_expr(Expr, LineNumber, Vars) -> Expr.
  +
  +to_expr([], L, _) -> {nil,L};
  +to_expr(I, L, _) when is_integer(I) -> {integer,L,I};
  +to_expr(F, L, _) when is_float(F) -> {float,L,F};
  +to_expr(V, L, Vs) when is_atom(V) ->		%Unquoted atom
  +    {var,L,var_name(V, Vs)};
  +to_expr(T, L, Vs) when is_tuple(T) ->
  +    {tuple,L,to_expr_list(tuple_to_list(T), L, Vs)};
  +to_expr(?Q(V), L, _) -> to_lit(V, L);
  +to_expr([cons,H,T], L, Vs) ->
  +    {cons,L,to_expr(H, L, Vs),to_expr(T, L, Vs)};
  +to_expr([car,E], L, Vs) -> {call,L,{atom,L,hd},[to_expr(E, L, Vs)]};
  +to_expr([cdr,E], L, Vs) -> {call,L,{atom,L,tl},[to_expr(E, L, Vs)]};
  +to_expr([list|Es], L, Vs) ->
  +    foldr(fun (E, T) -> {cons,L,to_expr(E, L, Vs),T} end, {nil,L}, Es);
  +to_expr([tuple|Es], L, Vs) ->
  +    {tuple,L,to_expr_list(Es, L, Vs)};
  +to_expr([binary|Segs], L, Vs) ->
  +    {bin,L,to_bitsegs(Segs, L, Vs)};
   %% Core closure special forms.
  -to_expr([lambda,As|B], L) ->
  -    {'fun',L,{clauses,[to_fun_cl([As|B], L)]}};
  -to_expr(['match-lambda'|Cls], L) ->
  -    {'fun',L,{clauses,to_fun_cls(Cls, L)}};
  -to_expr(['fun',F,A], L) -> {'fun',L,{function,F,A}};
  -to_expr(['fun',M,F,A], L) -> {'fun',L,{function,M,F,A}};
  -to_expr(['let',Lbs0|B0], L) ->
  -    Lbs1 = to_let_bindings(Lbs0, L),
  -    B1 = to_body(B0, L),
  +to_expr([lambda,As|B], L, Vs) ->
  +    {'fun',L,{clauses,[to_fun_cl([As|B], L, Vs)]}};
  +to_expr(['match-lambda'|Cls], L, Vs) ->
  +    {'fun',L,{clauses,to_fun_cls(Cls, L, Vs)}};
  +to_expr(['fun',F,A], L, _) -> {'fun',L,{function,F,A}};
  +to_expr(['fun',M,F,A], L, _) -> {'fun',L,{function,M,F,A}};
  +to_expr(['let',Lbs0|B0], L, Vs0) ->
  +    {Lbs1,Vs1} = to_let_bindings(Lbs0, L, Vs0),
  +    B1 = to_body(B0, L, Vs1),
       {block,L,Lbs1 ++ B1};
   %% Core control special forms.
  -to_expr([progn|B], L) -> to_block(B, L);
  -to_expr(['if',Test,True], L) ->
  -    to_expr(['if',Test,True,?Q(false)], L);
  -to_expr(['if',Test,True,False], L) ->
  -    {'case',L,to_expr(Test, L),
  -     to_icrt_cls([[?Q(true),True],[?Q(false),False]], L)};
  -to_expr(['case',E|Cls], L) ->
  -    {'case',L,to_expr(E, L),to_icrt_cls(Cls, L)};
  -to_expr(['receive'|Cls0], L) ->
  +to_expr([progn|B], L, Vs) -> to_block(B, L, Vs);
  +to_expr(['if',Test,True], L, Vs) ->
  +    to_expr(['if',Test,True,?Q(false)], L, Vs);
  +to_expr(['if',Test,True,False], L, Vs) ->
  +    {'case',L,to_expr(Test, L, Vs),
  +     to_icrt_cls([[?Q(true),True],[?Q(false),False]], L, Vs)};
  +to_expr(['case',E|Cls], L, Vs) ->
  +    {'case',L,to_expr(E, L, Vs),to_icrt_cls(Cls, L, Vs)};
  +to_expr(['receive'|Cls0], L, Vs) ->
       %% Get the right receive form depending on whether there is an after.
       {Cls1,A} = splitwith(fun (['after'|_]) -> false; (_) -> true end, Cls0),
       case A of
   	[['after',T|B]] ->
  -	    {'receive',L,to_icrt_cls(Cls1, L),to_expr(T, L),to_body(B, L)};
  +	    {'receive',L,to_icrt_cls(Cls1, L, Vs),
  +	     to_expr(T, L, Vs),to_body(B, L, Vs)};
   	[] ->
  -	    {'receive',L,to_icrt_cls(Cls1, L)}
  +	    {'receive',L,to_icrt_cls(Cls1, L, Vs)}
       end;
   %% Special known macros.
   %% No record stuff here as they are macros which have been expanded.
  -to_expr([lc,Qs0|Es], L) ->
  -    Qs1 = to_lc_quals(Qs0, L),
  -    {lc,L,to_block(Es, L),Qs1};
  +%% Only lc for QLC.
  +to_expr([lc,Qs0|Es], L, Vs0) ->
  +    {Qs1,Vs1} = to_lc_quals(Qs0, L, Vs0),
  +    {lc,L,to_block(Es, L, Vs1),Qs1};
   %% General function calls.
  -to_expr([call,?Q(erlang),?Q(F)|As], L) ->
  +to_expr([call,?Q(erlang),?Q(F)|As], L, Vs) ->
       %% This is semantically the same but some tools behave differently
       %% (qlc_pt).
       case is_erl_op(F, length(As)) of
  -	true -> list_to_tuple([op,L,F|to_expr_list(As, L)]);
  +	true -> list_to_tuple([op,L,F|to_expr_list(As, L, Vs)]);
   	false ->
  -	    {call,L,{remote,{atom,L,erlang},{atom,L,F}},to_expr_list(As, L)}
  +	    {call,L,{remote,{atom,L,erlang},{atom,L,F}},
  +	     to_expr_list(As, L, Vs)}
       end;
  -to_expr([call,M,F|As], L) ->
  -    {call,L,{remote,L,to_expr(M, L),to_expr(F, L)},to_expr_list(As, L)};
  -to_expr([F|As], L) when is_atom(F) ->		%General function call
  +to_expr([call,M,F|As], L, Vs) ->
  +    {call,L,{remote,L,to_expr(M, L, Vs),to_expr(F, L, Vs)},
  +     to_expr_list(As, L, Vs)};
  +to_expr([F|As], L, Vs) when is_atom(F) ->	%General function call
       case is_erl_op(F, length(As)) of
  -	true -> list_to_tuple([op,L,F|to_expr_list(As, L)]);
  -	false -> {call,L,{atom,L,F},to_expr_list(As, L)}
  +	true -> list_to_tuple([op,L,F|to_expr_list(As, L, Vs)]);
  +	false -> {call,L,{atom,L,F},to_expr_list(As, L, Vs)}
       end;
  -to_expr(List, L) ->
  +to_expr(List, L, _) ->
       case is_integer_list(List) of
   	true -> {string,L,List};
   	false ->
  
positive.code:     is_integer_list(Is);
  is_integer_list([]) -> true;
  is_integer_list(_) -> false.
  
negative.code: from_bitseg_size(default) -> [];
  from_bitseg_size(Size) -> [[size,from_expr(Size)]].
  
  from_bitseg_type(default) -> [];
  from_bitseg_type(Ts) ->
      map(fun ({unit,U}) -> [unit,U]; (T) -> T end, Ts).
  
  from_bitseg({integer,_,I}, Size, Type) ->
      [I|from_bitseg_type(Type) ++ from_bitseg_size(Size)];
  from_bitseg({float,_,F}, Size, Type) ->
  