anchor.diff:  %% We inline some very common higher order list operations.
   %% We use the same evaluation order as the library function.
   
  -call_1(_Call, lists, all, [Arg1,Arg2], Sub) ->
  +call_1(#c_call{anno=Anno}, lists, all, [Arg1,Arg2], Sub) ->
       Loop = #c_var{name={'lists^all',1}},
       F = #c_var{name='F'},
       Xs = #c_var{name='Xs'},
       X = #c_var{name='X'},
       Err1 = #c_tuple{es=[#c_literal{val='case_clause'}, X]},
       CC1 = #c_clause{pats=[#c_literal{val=true}], guard=#c_literal{val=true},
  -		    body=#c_apply{op=Loop, args=[Xs]}},
  +		    body=#c_apply{anno=Anno, op=Loop, args=[Xs]}},
       CC2 = #c_clause{pats=[#c_literal{val=false}], guard=#c_literal{val=true},
   		    body=#c_literal{val=false}},
       CC3 = #c_clause{pats=[X], guard=#c_literal{val=true},
  -		    body=#c_primop{name=#c_literal{val='match_fail'},
  -				   args=[Err1]}},
  +		    body=match_fail(Anno, Err1)},
       C1 = #c_clause{pats=[#c_cons{hd=X, tl=Xs}], guard=#c_literal{val=true},
  -		   body=#c_case{arg=#c_apply{op=F, args=[X]},
  +		   body=#c_case{arg=#c_apply{anno=Anno, op=F, args=[X]},
   				clauses = [CC1, CC2, CC3]}},
       C2 = #c_clause{pats=[#c_literal{val=[]}], guard=#c_literal{val=true},
   		   body=#c_literal{val=true}},
       Err2 = #c_tuple{es=[#c_literal{val='function_clause'}, Xs]},
       C3 = #c_clause{pats=[Xs], guard=#c_literal{val=true},
  -		   body=#c_primop{name=#c_literal{val='match_fail'},
  -				  args=[Err2]}},
  +		   body=match_fail(Anno, Err2)},
       Fun = #c_fun{vars=[Xs],
   		 body=#c_case{arg=Xs, clauses=[C1, C2, C3]}},
       L = #c_var{name='L'},
       expr(#c_let{vars=[F, L], arg=#c_values{es=[Arg1, Arg2]},
   		body=#c_letrec{defs=[{Loop,Fun}],
  -			       body=#c_apply{op=Loop, args=[L]}}},
  +			       body=#c_apply{anno=Anno, op=Loop, args=[L]}}},
   	 Sub);
  -call_1(_Call, lists, any, [Arg1,Arg2], Sub) ->
  +call_1(#c_call{anno=Anno}, lists, any, [Arg1,Arg2], Sub) ->
       Loop = #c_var{name={'lists^any',1}},
       F = #c_var{name='F'},
       Xs = #c_var{name='Xs'},
  
positive.code:     CC2 = #c_clause{pats=[#c_literal{val=false}], guard=#c_literal{val=true},
  		    body=Xs},
      CC3 = #c_clause{pats=[X], guard=#c_literal{val=true},
  		    body=#c_primop{name=#c_literal{val='match_fail'},
  				   args=[Err1]}},
      Case = #c_case{arg=B, clauses = [CC1, CC2, CC3]},
      C1 = #c_clause{pats=[#c_cons{hd=X, tl=Xs}], guard=#c_literal{val=true},
  		   body=#c_let{vars=[B],
  			       arg=#c_apply{op=F, args=[X]},
  			       body=#c_let{vars=[Xs],
  					   arg=#c_apply{op=Loop,
  							args=[Xs]},
  					   body=Case}}},
      C2 = #c_clause{pats=[#c_literal{val=[]}], guard=#c_literal{val=true},
  		   body=#c_literal{val=[]}},
      Err2 = #c_tuple{es=[#c_literal{val='function_clause'}, Xs]},
      C3 = #c_clause{pats=[Xs], guard=#c_literal{val=true},
  		   body=#c_primop{name=#c_literal{val='match_fail'},
  				  args=[Err2]}},
      Fun = #c_fun{vars=[Xs],
  		 body=#c_case{arg=Xs, clauses=[C1, C2, C3]}},
      L = #c_var{name='L'},
      expr(#c_let{vars=[F, L], arg=#c_values{es=[Arg1, Arg2]},
  		body=#c_letrec{defs=[{Loop,Fun}],
  			       body=#c_apply{op=Loop, args=[L]}}},
      Sub);
  call_1(_Call, lists, foldl, [Arg1,Arg2,Arg3], Sub) ->
      Loop = #c_var{name={'lists^foldl',2}},
      F = #c_var{name='F'},
      Xs = #c_var{name='Xs'},
      X = #c_var{name='X'},
      A = #c_var{name='A'},
      C1 = #c_clause{pats=[#c_cons{hd=X, tl=Xs}], guard=#c_literal{val=true},
  		   body=#c_apply{op=Loop,
  				 args=[Xs, #c_apply{op=F, args=[X, A]}]}},
      C2 = #c_clause{pats=[#c_literal{val=[]}], guard=#c_literal{val=true}, body=A},
      Err = #c_tuple{es=[#c_literal{val='function_clause'}, Xs]},
      C3 = #c_clause{pats=[Xs], guard=#c_literal{val=true},
  		   body=#c_primop{name=#c_literal{val='match_fail'},
  				  args=[Err]}},
      Fun = #c_fun{vars=[Xs, A],
  		 body=#c_case{arg=Xs, clauses=[C1, C2, C3]}},
      L = #c_var{name='L'},
      expr(#c_let{vars=[F, A, L], arg=#c_values{es=[Arg1, Arg2, Arg3]},
  		body=#c_letrec{defs=[{Loop,Fun}],
  			       body=#c_apply{op=Loop, args=[L, A]}}},
  	 Sub);
  call_1(_Call, lists, foldr, [Arg1,Arg2,Arg3], Sub) ->
      Loop = #c_var{name={'lists^foldr',2}},
      F = #c_var{name='F'},
      Xs = #c_var{name='Xs'},
      X = #c_var{name='X'},
      A = #c_var{name='A'},
      C1 = #c_clause{pats=[#c_cons{hd=X, tl=Xs}], guard=#c_literal{val=true},
  		   body=#c_apply{op=F, args=[X, #c_apply{op=Loop,
  							 args=[Xs, A]}]}},
      C2 = #c_clause{pats=[#c_literal{val=[]}], guard=#c_literal{val=true}, body=A},
      Err = #c_tuple{es=[#c_literal{val='function_clause'}, Xs]},
      C3 = #c_clause{pats=[Xs], guard=#c_literal{val=true},
  		   body=#c_primop{name=#c_literal{val='match_fail'},
  				  args=[Err]}},
      Fun = #c_fun{vars=[Xs, A],
  		 body=#c_case{arg=Xs, clauses=[C1, C2, C3]}},
      L = #c_var{name='L'},
      expr(#c_let{vars=[F, A, L], arg=#c_values{es=[Arg1, Arg2, Arg3]},
  		body=#c_letrec{defs=[{Loop,Fun}],
  			       body=#c_apply{op=Loop, args=[L, A]}}},
  	 Sub);
  call_1(_Call, lists, mapfoldl, [Arg1,Arg2,Arg3], Sub) ->
      Loop = #c_var{name={'lists^mapfoldl',2}},
      F = #c_var{name='F'},
      Xs = #c_var{name='Xs'},
  
negative.code:     CC1 = #c_clause{pats=[#c_literal{val=true}], guard=#c_literal{val=true},
  		    body=#c_literal{val=true}},
      CC2 = #c_clause{pats=[#c_literal{val=false}], guard=#c_literal{val=true},
  		    body=#c_apply{anno=Anno, op=Loop, args=[Xs]}},
      CC3 = #c_clause{pats=[X], guard=#c_literal{val=true},
  		    body=match_fail(Anno, Err1)},
      C1 = #c_clause{pats=[#c_cons{hd=X, tl=Xs}], guard=#c_literal{val=true},
  		   body=#c_case{arg=#c_apply{anno=Anno, op=F, args=[X]},
  				clauses = [CC1, CC2, CC3]}},
      C2 = #c_clause{pats=[#c_literal{val=[]}], guard=#c_literal{val=true},
  		   body=#c_literal{val=false}},
      Err2 = #c_tuple{es=[#c_literal{val='function_clause'}, Xs]},
      C3 = #c_clause{pats=[Xs], guard=#c_literal{val=true},
  		   body=match_fail(Anno, Err2)},
      Fun = #c_fun{vars=[Xs],
  		 body=#c_case{arg=Xs, clauses=[C1, C2, C3]}},
      L = #c_var{name='L'},
      expr(#c_let{vars=[F, L], arg=#c_values{es=[Arg1, Arg2]},
  		body=#c_letrec{defs=[{Loop,Fun}],
  			       body=#c_apply{anno=Anno, op=Loop, args=[L]}}},
  	 Sub);
  call_1(#c_call{anno=Anno}, lists, foreach, [Arg1,Arg2], Sub) ->
      Loop = #c_var{name={'lists^foreach',1}},
      F = #c_var{name='F'},
      Xs = #c_var{name='Xs'},
      X = #c_var{name='X'},
      C1 = #c_clause{pats=[#c_cons{hd=X, tl=Xs}], guard=#c_literal{val=true},
  		   body=#c_seq{arg=#c_apply{anno=Anno, op=F, args=[X]},
  			       body=#c_apply{anno=Anno, op=Loop, args=[Xs]}}},
      C2 = #c_clause{pats=[#c_literal{val=[]}], guard=#c_literal{val=true},
  		   body=#c_literal{val=ok}},
      Err = #c_tuple{es=[#c_literal{val='function_clause'}, Xs]},
      C3 = #c_clause{pats=[Xs], guard=#c_literal{val=true},
  		   body=match_fail(Anno, Err)},
      Fun = #c_fun{vars=[Xs],
  		 body=#c_case{arg=Xs, clauses=[C1, C2, C3]}},
      L = #c_var{name='L'},
      expr(#c_let{vars=[F, L], arg=#c_values{es=[Arg1, Arg2]},
  		body=#c_letrec{defs=[{Loop,Fun}],
  			       body=#c_apply{anno=Anno, op=Loop, args=[L]}}},
  	 Sub);
  call_1(#c_call{anno=Anno}, lists, map, [Arg1,Arg2], Sub) ->
      Loop = #c_var{name={'lists^map',1}},
      F = #c_var{name='F'},
      Xs = #c_var{name='Xs'},
      X = #c_var{name='X'},
      H = #c_var{name='H'},
      C1 = #c_clause{pats=[#c_cons{hd=X, tl=Xs}], guard=#c_literal{val=true},
  		   body=#c_let{vars=[H], arg=#c_apply{anno=Anno,
  						      op=F,
  						      args=[X]},
  			       body=#c_cons{hd=H,
  					    tl=#c_apply{anno=Anno,
  							op=Loop,
  							args=[Xs]}}}},
      C2 = #c_clause{pats=[#c_literal{val=[]}], guard=#c_literal{val=true},
  		   body=#c_literal{val=[]}},
      Err = #c_tuple{es=[#c_literal{val='function_clause'}, Xs]},
      C3 = #c_clause{pats=[Xs], guard=#c_literal{val=true},
  		   body=match_fail(Anno, Err)},
      Fun = #c_fun{vars=[Xs],
  		 body=#c_case{arg=Xs, clauses=[C1, C2, C3]}},
      L = #c_var{name='L'},
      expr(#c_let{vars=[F, L], arg=#c_values{es=[Arg1, Arg2]},
  		body=#c_letrec{defs=[{Loop,Fun}],
  			       body=#c_apply{anno=Anno, op=Loop, args=[L]}}},
  	 Sub);
  call_1(#c_call{anno=Anno}, lists, flatmap, [Arg1,Arg2], Sub) ->
      Loop = #c_var{name={'lists^flatmap',1}},
      F = #c_var{name='F'},
      Xs = #c_var{name='Xs'},
  