anchor.diff:  
   replace_expr_with_fun_call(Form, ExpList, NewFunName, ParNames, VarsToExport) ->
       Op = refac_syntax:atom(NewFunName),
  -    Pars = [refac_syntax:variable(P)|| P <-ParNames],
  -    FunCall= refac_syntax:copy_pos(hd(ExpList), refac_syntax:application(Op, Pars)),
  -    NewExpr = case length(VarsToExport) of 
  -		  0  ->  
  -		      FunCall;
  -		  1 -> 
  -		      Pats = refac_syntax:variable(hd(VarsToExport)),
  -		      refac_syntax:match_expr(Pats, FunCall);
  -		  _ ->
  -		      Pats = refac_syntax:tuple([refac_syntax:variable(V) || V <- VarsToExport]),
  -		      refac_syntax:match_expr(Pats, FunCall)
  +    Pars = [refac_syntax:variable(P) || P <- ParNames],
  +    FunCall = refac_syntax:copy_pos(hd(ExpList), refac_syntax:application(Op, Pars)),
  +    NewExpr = case length(VarsToExport) of
  +		0 ->
  +		    FunCall;
  +		1 ->
  +		    Pats = refac_syntax:variable(hd(VarsToExport)),
  +		    refac_syntax:match_expr(Pats, FunCall);
  +		_ ->
  +		    Pats = refac_syntax:tuple([refac_syntax:variable(V) || V <- VarsToExport]),
  +		    refac_syntax:match_expr(Pats, FunCall)
   	      end,
  -    case (length(ExpList)==1) andalso (refac_syntax:type(hd(ExpList))=/=match_expr) of
  -	true -> 
  -	    {Form1, _} =refac_util:stop_tdTP(
  -			  fun do_replace_expr_with_fun_call_1/2, Form, {NewExpr, hd(ExpList)}),
  -	    Form1;
  -	_ ->
  -	    {Form1, _} =refac_util:stop_tdTP(
  -			  fun do_replace_expr_with_fun_call_2/2, Form, {NewExpr, ExpList}),
  -	    Form1
  +    case length(ExpList) == 1 andalso refac_syntax:type(hd(ExpList)) =/= match_expr of
  +      true ->
  +	  {Form1, _} = refac_util:stop_tdTP(
  +			 fun do_replace_expr_with_fun_call_1/2, Form, {NewExpr, hd(ExpList)}),
  +	  Form1;
  +      _ ->
  +	  {Form1, _} = refac_util:stop_tdTP(
  +			 fun do_replace_expr_with_fun_call_2/2, Form, {NewExpr, ExpList}),
  +	  Form1
       end.
       
   do_replace_expr_with_fun_call_1(Tree, {NewExpr, Expr}) ->
  
positive.code: 	end,
      refac_syntax_lib:fold(F, [], Tree).
  
  
  is_guard_expr(Node) ->
      As = refac_syntax:get_ann(Node),
  
negative.code: 	    ExpList1 = filter_exprs_via_ast(Fun, ExpList),
  	    case ExpList1 of
  		[] -> ok;
  		_ -> throw({error, "The expression sequence selected "
  		      "cannot be replaced by a function call!"})
  	    end
      end.
  
  check_expr_category(Fun, Exp) ->
      case is_macro_arg(Fun, Exp) of
  	true ->
  	    throw({warning, "The expression selected is part of a macro application, "
  		   "Wrangler cannot guarantee the correctness of transformation. Still continue?"});
  	false ->
  	    check_expr_category_1(Fun, Exp)
      end.
  
  check_expr_category_1(Fun, Exp) ->
      case lists:keysearch(category, 1, refac_syntax:get_ann(Exp)) of
        {value, {category, record_field}} ->
  	  throw({error, "Record field cannot be replaced "
  			"by a function application."});
        {value, {category, record_type}} ->
  	  throw({error, "Record type cannot be replaced "
  			"by a function application."});
        {value, {category, guard_expression}} ->
  	  throw({error, "Function abstraction whithin a "
  			"guard expression is not supported."});
        {value, {category, generator}} ->
  	  throw({error, "Function abstraction over a generator"
  			"is not supported."});
        {value, {category, application_op}} ->
  	  case is_part_of_guard_expr(Fun, Exp) of 
  	      true ->
  		  throw({error, "Function abastraction within "
  			 "a guard expression is not supported."});
  	      false -> ok
  	  end;
        _ -> ok
      end.
  
  is_part_of_guard_expr(Fun, Exp) ->
      GuardRanges = collect_guard_ranges(Fun),
      {Start, End} = refac_util:get_range(Exp),
      lists:any(fun ({S1, E1}) ->
  		      S1 =< Start andalso End =< E1
  	      end, GuardRanges).
  
  is_macro_arg(Fun, Exp) ->
      MacroArgRanges = collect_macro_arg_ranges(Fun),
      {Start, End} = refac_util:get_range(Exp),
      lists:any(fun ({S1, E1}) ->
  		      S1 =< Start andalso End =< E1
  	      end, MacroArgRanges).
      
    
  collect_prime_expr_ranges(Tree) ->
       F= fun(T, S) ->
   		   case refac_syntax:type(T) of 
  