anchor.diff:      ok;
   check_type(_,[{nil,_}],dbg) ->
       ok;
  -check_type(Line0,[{match,_,{var,_,_},X}],Any) ->
  -    check_type(Line0,[X],Any);
  -check_type(Line0,[{match,_,X,{var,_,_}}],Any) ->
  -    check_type(Line0,[X],Any);
  -check_type(Line,_Type,ets) ->
  -    throw({error,Line,?ERR_ETS_HEAD});
  -check_type(Line,_,dbg) ->
  -    throw({error,Line,?ERR_DBG_HEAD}).
  +check_type(Anno0,[{match,_,{var,_,_},X}],Any) ->
  +    check_type(Anno0,[X],Any);
  +check_type(Anno0,[{match,_,X,{var,_,_}}],Any) ->
  +    check_type(Anno0,[X],Any);
  +check_type(Anno,_Type,ets) ->
  +    throw({error,Anno,?ERR_ETS_HEAD});
  +check_type(Anno,_,dbg) ->
  +    throw({error,Anno,?ERR_DBG_HEAD}).
   
   -record(tgd,{ b, %Bindings 
   	      p, %Part of spec
   	      eb %Error code base, 0 for guards, 100 for bodies
   	     }).
   
  -transform_guards(Line,[],_Bindings) ->
  -    {nil,Line};
  -transform_guards(Line,[G],Bindings) ->
  +transform_guards(Anno,[],_Bindings) ->
  +    {nil,Anno};
  +transform_guards(Anno,[G],Bindings) ->
       B = #tgd{b = Bindings, p = guard, eb = ?ERROR_BASE_GUARD},
  -    tg0(Line,G,B);
  -transform_guards(Line,_,_) ->
  -    throw({error,Line,?ERR_SEMI_GUARD}).
  +    tg0(Anno,G,B);
  +transform_guards(Anno,_,_) ->
  +    throw({error,Anno,?ERR_SEMI_GUARD}).
       
  -transform_body(Line,Body,Bindings) ->
  +transform_body(Anno,Body,Bindings) ->
       B = #tgd{b = Bindings, p = body, eb = ?ERROR_BASE_BODY},
  -    tg0(Line,Body,B).
  +    tg0(Anno,Body,B).
       
   
  -guard_top_trans({call,Line0,{atom,Line1,OldTest},Params}) ->
  +guard_top_trans({call,Anno0,{atom,Anno1,OldTest},Params}) ->
       case old_bool_test(OldTest,length(Params)) of
   	undefined ->
  -	    {call,Line0,{atom,Line1,OldTest},Params};
  +	    {call,Anno0,{atom,Anno1,OldTest},Params};
   	Trans ->
  -	    {call,Line0,{atom,Line1,Trans},Params}
  +	    {call,Anno0,{atom,Anno1,Trans},Params}
       end;
   guard_top_trans(Else) ->
       Else.
   
  -tg0(Line,[],_) ->
  -    {nil,Line};
  -tg0(Line,[H0|T],B) when B#tgd.p =:= guard ->
  +tg0(Anno,[],_) ->
  +    {nil,Anno};
  +tg0(Anno,[H0|T],B) when B#tgd.p =:= guard ->
       H = guard_top_trans(H0),
  -    {cons,Line, tg(H,B), tg0(Line,T,B)};
  -tg0(Line,[H|T],B) ->
  -    {cons,Line, tg(H,B), tg0(Line,T,B)}.
  +    {cons,Anno, tg(H,B), tg0(Anno,T,B)};
  +tg0(Anno,[H|T],B) ->
  +    {cons,Anno, tg(H,B), tg0(Anno,T,B)}.
       
   
  -tg({match,Line,_,_},B) -> 
  -    throw({error,Line,?ERR_GENMATCH+B#tgd.eb});
  -tg({op, Line, Operator, O1, O2}=Expr, B) ->
  +tg({match,Anno,_,_},B) ->
  +    throw({error,Anno,?ERR_GENMATCH+B#tgd.eb});
  +tg({op, Anno, Operator, O1, O2}=Expr, B) ->
       case erl_eval:partial_eval(Expr) of
           Expr ->
  -            {tuple, Line, [{atom, Line, Operator}, tg(O1, B), tg(O2, B)]};
  +            {tuple, Anno, [{atom, Anno, Operator}, tg(O1, B), tg(O2, B)]};
           Value ->
               Value
       end;
  -tg({op, Line, Operator, O1}=Expr, B) ->
  +tg({op, Anno, Operator, O1}=Expr, B) ->
       case erl_eval:partial_eval(Expr) of
           Expr ->
  -            {tuple, Line, [{atom, Line, Operator}, tg(O1, B)]};
  +            {tuple, Anno, [{atom, Anno, Operator}, tg(O1, B)]};
           Value ->
               Value
       end;
  -tg({call, _Line, {atom, Line2, bindings},[]},_B) ->
  -    	    {atom, Line2, '$*'};
  -tg({call, _Line, {atom, Line2, object},[]},_B) ->
  -    	    {atom, Line2, '$_'};
  -tg({call, Line, {atom, _, is_record}=Call,[Object, {atom,Line3,RName}=R]},B) ->
  +tg({call, _Anno, {atom, Anno2, bindings},[]},_B) ->
  +    {atom, Anno2, '$*'};
  +tg({call, _Anno, {atom, Anno2, object},[]},_B) ->
  +    {atom, Anno2, '$_'};
  +tg({call, Anno, {atom, _, is_record}=Call,[Object, {atom,Anno3,RName}=R]},B) ->
       MSObject = tg(Object,B),
       RDefs = get_records(),
       case lists:keysearch(RName,1,RDefs) of
   	{value, {RName, FieldList}} ->
   	    RSize = length(FieldList)+1,
  -	    {tuple, Line, [Call, MSObject, R, {integer, Line3, RSize}]};
  -	_ ->
  -	    throw({error,Line3,{?ERR_GENBADREC+B#tgd.eb,RName}})
  -    end;
  -tg({call, Line, {atom, Line2, FunName},ParaList},B) ->
  +	    {tuple, Anno, [Call, MSObject, R, {integer, Anno3, RSize}]};
  +	_ ->
  +	    throw({error,Anno3,{?ERR_GENBADREC+B#tgd.eb,RName}})
  +    end;
  +tg({call, Anno, {atom, Anno2, FunName},ParaList},B) ->
       case is_ms_function(FunName,length(ParaList), B#tgd.p) of
   	true ->
  -	    {tuple, Line, [{atom, Line2, FunName} | 
  +	    {tuple, Anno, [{atom, Anno2, FunName} |
   			   lists:map(fun(X) -> tg(X,B) end, ParaList)]};
   	_ ->
  -	    throw({error,Line,{?ERR_GENLOCALCALL+B#tgd.eb,
  +	    throw({error,Anno,{?ERR_GENLOCALCALL+B#tgd.eb,
   			       FunName,length(ParaList)}}) 
       end;
  -tg({call, Line, {remote,_,{atom,_,erlang},{atom, Line2, FunName}},ParaList},
  +tg({call, Anno, {remote,_,{atom,_,erlang},{atom, Anno2, FunName}},ParaList},
      B) ->
       L = length(ParaList),
       case is_imported_from_erlang(FunName,L,B#tgd.p) of
   	true ->
   	    case is_operator(FunName,L,B#tgd.p) of
   		false ->
  -		    tg({call, Line, {atom, Line2, FunName},ParaList},B);
  +		    tg({call, Anno, {atom, Anno2, FunName},ParaList},B);
   		true ->
  -		    tg(list_to_tuple([op,Line2,FunName | ParaList]),B)
  +		    tg(list_to_tuple([op,Anno2,FunName | ParaList]),B)
   		end;
   	_ ->
  -	    throw({error,Line,{?ERR_GENREMOTECALL+B#tgd.eb,erlang,
  +	    throw({error,Anno,{?ERR_GENREMOTECALL+B#tgd.eb,erlang,
   			       FunName,length(ParaList)}}) 
       end;
  -tg({call, Line, {remote,_,{atom,_,ModuleName},
  +tg({call, Anno, {remote,_,{atom,_,ModuleName},
   		 {atom, _, FunName}},ParaList},B) ->
  -    throw({error,Line,{?ERR_GENREMOTECALL+B#tgd.eb,ModuleName,FunName,length(ParaList)}});
  -tg({cons,Line, H, T},B) -> 
  -    {cons, Line, tg(H,B), tg(T,B)};
  -tg({nil, Line},_B) ->
  -    {nil, Line};
  -tg({tuple,Line,L},B) ->
  -    {tuple,Line,[{tuple,Line,lists:map(fun(X) -> tg(X,B) end, L)}]};
  -tg({integer,Line,I},_) ->
  -    {integer,Line,I};
  -tg({char,Line,C},_) ->
  -    {char,Line,C};
  -tg({float, Line,F},_) ->
  -    {float,Line,F};
  -tg({atom,Line,A},_) ->
  +    throw({error,Anno,{?ERR_GENREMOTECALL+B#tgd.eb,ModuleName,FunName,length(ParaList)}});
  +tg({cons,Anno, H, T},B) ->
  +    {cons, Anno, tg(H,B), tg(T,B)};
  +tg({nil, Anno},_B) ->
  +    {nil, Anno};
  +tg({tuple,Anno,L},B) ->
  +    {tuple,Anno,[{tuple,Anno,lists:map(fun(X) -> tg(X,B) end, L)}]};
  +tg({integer,Anno,I},_) ->
  +    {integer,Anno,I};
  +tg({char,Anno,C},_) ->
  +    {char,Anno,C};
  +tg({float, Anno,F},_) ->
  +    {float,Anno,F};
  +tg({atom,Anno,A},_) ->
       case atom_to_list(A) of
   	[$$|_] ->
  -	   {tuple, Line,[{atom, Line, 'const'},{atom,Line,A}]};
  -	_ ->
  -	    {atom,Line,A}
  -    end;
  -tg({string,Line,S},_) ->
  -    {string,Line,S};
  -tg({var,Line,VarName},B) ->
  +	   {tuple, Anno,[{atom, Anno, 'const'},{atom,Anno,A}]};
  +	_ ->
  +	    {atom,Anno,A}
  +    end;
  +tg({string,Anno,S},_) ->
  +    {string,Anno,S};
  +tg({var,Anno,VarName},B) ->
       case lkup_bind(VarName, B#tgd.b) of
   	undefined ->
  -	    {tuple, Line,[{atom, Line, 'const'},{var,Line,VarName}]};
  +	    {tuple, Anno,[{atom, Anno, 'const'},{var,Anno,VarName}]};
   	AtomName ->
  -	    {atom, Line, AtomName}
  -    end;
  -tg({record_field,Line,Object,RName,{atom,_Line1,KeyName}},B) ->
  +	    {atom, Anno, AtomName}
  +    end;
  +tg({record_field,Anno,Object,RName,{atom,_Anno1,KeyName}},B) ->
       RDefs = get_records(),
       case lists:keysearch(RName,1,RDefs) of
   	{value, {RName, FieldList}} ->
   	    case lists:keysearch(KeyName,1, FieldList) of
   		{value, {KeyName,Position,_}} ->
   		    NewObject = tg(Object,B),
  -		    {tuple, Line, [{atom, Line, 'element'}, 
  -				   {integer, Line, Position}, NewObject]};
  +		    {tuple, Anno, [{atom, Anno, 'element'},
  +				   {integer, Anno, Position}, NewObject]};
   		_ ->
  -		    throw({error,Line,{?ERR_GENBADFIELD+B#tgd.eb, RName, 
  +		    throw({error,Anno,{?ERR_GENBADFIELD+B#tgd.eb, RName,
   				       KeyName}})
   	    end;
   	_ ->
  -	    throw({error,Line,{?ERR_GENBADREC+B#tgd.eb,RName}})
  -    end;
  -
  -tg({record,Line,RName,RFields},B) ->
  +	    throw({error,Anno,{?ERR_GENBADREC+B#tgd.eb,RName}})
  +    end;
  +
  +tg({record,Anno,RName,RFields},B) ->
       RDefs = get_records(),
       KeyList0 = lists:foldl(fun({record_field,_,{atom,_,Key},Value},
   				     L) ->
  
positive.code: 			   end,
  			   [],
  			   FieldList0),
  	    check_multi_field(RName,Line,KeyList,
  				 ?ERR_HEADMULTIFIELD),
  	    check_undef_field(RName,Line,KeyList,FieldList0,
  			      ?ERR_HEADBADFIELD),
  	    {{tuple,Line,[{atom,Line,RName}|FieldList1]},NewB};
  	_ ->
  	    throw({error,Line,{?ERR_HEADBADREC,RName}})
      end;
  th({match,Line,_,_},_,_) ->
      throw({error,Line,?ERR_HEADMATCH});
  th({atom,Line,A},B,_OB) ->
      case atom_to_list(A) of
  	[$$|NL] ->
  	    case (catch list_to_integer(NL)) of
  		N when is_integer(N) ->
  		    throw({error,Line,{?ERR_HEADDOLLARATOM,A}});
  		_ ->
  		    {{atom,Line,A},B}
  	    end;
  	_ ->
  	    {{atom,Line,A},B}
      end;
  th({bin_element,_Line0,{var, Line, A},_,_},_,_) ->
      throw({error,Line,{?ERR_HEADBINMATCH,A}});
  
  th({var,Line,Name},B,OB) ->
      warn_var_clash(Line,Name,OB),
      case lkup_bind(Name,B) of
  	undefined ->
  	    NewB = new_bind(Name,B),
  	    {{atom,Line,lkup_bind(Name,NewB)},NewB};
  	Trans ->
  	    {{atom,Line,Trans},B}
      end;
  th([H|T],B,OB) ->
      {NH,NB} = th(H,B,OB),
  
negative.code:     th(NewV,NewBind,OuterBound).
  
  
  toplevel_head_match({match,_,{var,Anno,VName},Expr},B,OB) ->
      warn_var_clash(Anno,VName,OB),
      {Expr,new_bind({VName,'$_'},B)};
  toplevel_head_match({match,_,Expr,{var,Anno,VName}},B,OB) ->
      warn_var_clash(Anno,VName,OB),
      {Expr,new_bind({VName,'$_'},B)};
  toplevel_head_match(Other,B,_OB) ->
      {Other,B}.
  
  th({record,Anno,RName,RFields},B,OB) ->
      % youch...
      RDefs = get_records(),
      {KeyList0,NewB} = lists:foldl(fun({record_field,_,{atom,_,Key},Value},
  