anchor.diff:  	_ -> {Node, false}
       end.
       
  -collect_exprs_in_expr_sequences(Tree) ->  
  -    Fun = fun (T, S) ->
  -		  case refac_syntax:type(T) of
  -		      clause ->
  -			  S++refac_syntax:clause_body(T);
  -		      block_expr ->
  -			  S++ refac_syntax:block_expr_body(T);
  -		      try_expr ->
  -			  S++ refac_syntax:try_expr_body(T);
  -		      _ -> S
  -		  end
  -	  end,
  -    refac_syntax_lib:fold(Fun, [], Tree).
  -
   remove_begin_end(Node, BlockBody) ->
       Fun = fun(E) ->
   		  case refac_syntax:type(E) of
  
positive.code:     Res = [F || F <- Fs, refac_syntax:type(F) == function,
  		case lists:keysearch(fun_def, 1, refac_syntax:get_ann(F)) of
  		    {value, {fun_def, {ModName, FunName, Arity, _, _}}} -> true;
  		    _ -> false
  		end],
      case Res of
  	[FunDef] -> 
  	    Cs = refac_syntax:function_clauses(FunDef),
  	    case find_matching_clause(Cs, Args) of
  		none -> throw ({error, "Wrangler could not figure out which function clause to inline."});
  		{C, Subst} -> 
  		    Body = refac_syntax:clause_body(C),
  		    case static_semantic_checking(Body, {Clause, App}) of 
  			{error, Reason} ->
  			    throw({error, Reason});
  			ok ->
  			    {ok, {C, Subst}}
  		    end
  	    end;
  	[] -> 
  	    throw({error, "Inlining a function defined in another module is not supported yet."});
  	[_|_]->
  	    throw({error, "The function has been defined more than once."})
      end.
  
  find_matching_clause([], _Ps) -> none;
  
negative.code:     end.
  
  
  do_inline(Form, Pos, _Clause, App, SubstedBody) ->
      {S, E} = refac_util:get_range(Form),
      if (S =< Pos) and (Pos =< E) ->
  	   {NewForm, _} = refac_util:stop_tdTP(fun do_inline_1/2, Form, {App, SubstedBody}),
  	    case length(SubstedBody) > 1 of
  		true ->
  		    {NewForm1, _} = refac_util:stop_tdTP(fun remove_begin_end/2, NewForm, SubstedBody),
  		    NewForm1;
  		_ -> NewForm
  	    end;
         true ->
  	    Form
      end.
  
  