anchor.diff:  	end 
       ]).
   
  -is_package_an_app(PackageDir) ->
  -    lists:all(fun(F) -> F(PackageDir) end, [
  -	
  -	%% Run all the following lambda's and if all of them return true then we have a well formed application.
  -	
  -	fun(PackageDir_) ->  
  -            case filelib:wildcard(PackageDir_ ++ "/ebin/*.app") of
  -		[_|_] -> 
  -		    true;
  -		[] -> 
  -		    ?INFO_MSG("can't find the .app file at ~p~n", [PackageDir_]),
  -		    false
  -	    end
  -	end, 
  -	
  -	fun(PackageDir_) ->
  -            case verify_presence_of_erl_files(PackageDir_) of
  -		ok -> 
  -                    true;
  -		{error, _} -> 
  -                    false
  -	    end
  -	end
  -    ]).
  -
  -is_package_an_unbuilt_app(PackageDir) ->
  -    lists:all(fun(F) -> F(PackageDir) end, [
  -	
  -	%% Run all the following lambda's and if all of them return true the package dir is an unbuilt app and the function
  -	%% will return true.
  -	
  -	fun(PackageDir_) ->  
  -		0 == length(filelib:wildcard(PackageDir_ ++ "/ebin/*beam"))
  -	end 
  -	
  -        %fun(PackageDir_) ->
  -                %Files = [filename:basename(F) || F <- ewl_file:find(PackageDir_, ".*")],
  -		%% For now only a build.sh file constitutes unbuilt. Perhaps configure and make files in the future.
  -                %lists:any(fun(File) -> lists:member(File, Files) end, ["build.sh"])
  -        %end
  -    ]).
  -
  +%%--------------------------------------------------------------------
  +%% @doc boolean function to indicate if the package is of the type 
  +%%      in question.
  +%% @spec (AppDir) -> {ok, Type} | {error, Reason}
  +%% where
  +%%  Type = binary | generic | unbuilt | release | erts | docs
  +%% @end
  +%%--------------------------------------------------------------------
  +is_package_an_unbuilt_app(AppDir) ->
  +    0 == length(filelib:wildcard(AppDir ++ "/ebin/*beam")).
  +
  +%%--------------------------------------------------------------------
  +%% @doc boolean function to indicate if the package is of the type 
  +%%      in question.
  +%% @spec (PackageDir) -> {ok, Type} | {error, Reason}
  +%% where
  +%%  Type = binary | generic | unbuilt | release | erts | docs
  +%% @end
  +%%--------------------------------------------------------------------
   is_package_a_binary_app(PackageDir) ->
       lists:any(fun(F) -> F(PackageDir) end, [
   	
  
positive.code:     ?INFO_MSG("is it erts, binary, generic, unbuilt, or edoc ~p~n", [PackageDir]),
      val_edoc(PackageDir).
  
  val_edoc(PackageDir) ->
      case is_package_edoc(PackageDir) of
  	true ->
  	    {ok, edoc};
  	false ->
  	    val_erts(PackageDir)
      end.
  
  val_erts(PackageDir) ->
      case is_package_erts(PackageDir) of
  	true ->
  	    {ok, erts};
  	false -> 
  	    val_app(PackageDir)
      end.
  
  val_app(PackageDir) ->
      case is_package_an_app(PackageDir) of
  	true ->
  	    case is_package_an_unbuilt_app(PackageDir) of
  		true ->
  		    {ok, unbuilt};
  		false ->
  		    case is_package_a_binary_app(PackageDir) of
  			true  -> {ok, binary};
  			false -> {ok, generic}
  		    end
  	    end;
  	false ->
  	    val_release(PackageDir)
      end.
  
  val_release(PackageDir) ->
      case is_package_a_release(PackageDir) of
  	true  -> {ok, release};
  	false -> {error, badly_formatted_or_missing_package}
      end.
  
  is_package_edoc(PackageDir) ->
      lists:all(fun(F) -> F(PackageDir) end,
  	      [
  
negative.code: -export([
  	 validate_type/1,
  	 verify_presence_of_erl_files/1,
  	 analyze_app/1,
  	 verify_app_erts_vsn/1,
  	 is_package_erts/1,
  	 is_package_an_app/1,
  