From 650e38a0ab73170d3fce3d66f3b1fd548cddfc4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 26 Mar 2014 21:45:39 +0100 Subject: Export type application:start_type() Also use this type in the start/2 callback spec. --- lib/kernel/src/application.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/kernel/src/application.erl b/lib/kernel/src/application.erl index 76a80553b0..c4bef5188a 100644 --- a/lib/kernel/src/application.erl +++ b/lib/kernel/src/application.erl @@ -30,6 +30,8 @@ -export([get_application/0, get_application/1, info/0]). -export([start_type/0]). +-export_type([start_type/0]). + %%%----------------------------------------------------------------- -type start_type() :: 'normal' @@ -58,8 +60,7 @@ %%------------------------------------------------------------------ --callback start(StartType :: normal | {takeover, node()} | {failover, node()}, - StartArgs :: term()) -> +-callback start(StartType :: start_type(), StartArgs :: term()) -> {'ok', pid()} | {'ok', pid(), State :: term()} | {'error', Reason :: term()}. -callback stop(State :: term()) -> -- cgit v1.2.3 From f9a5947ed8daf3b673ed94089a03553f87c56743 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Fri, 28 Mar 2014 16:43:02 +0100 Subject: Fix reference to start_type() i application(3) --- lib/kernel/doc/src/application.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/kernel/doc/src/application.xml b/lib/kernel/doc/src/application.xml index 016151891c..7664fda4db 100644 --- a/lib/kernel/doc/src/application.xml +++ b/lib/kernel/doc/src/application.xml @@ -4,7 +4,7 @@
- 19962013 + 19962014 Ericsson AB. All Rights Reserved. @@ -459,8 +459,7 @@ Nodes = [cp1@cave, {cp2@cave, cp3@cave}] Module:start(StartType, StartArgs) -> {ok, Pid} | {ok, Pid, State} | {error, Reason} Start an application - StartType = normal | {takeover,Node} | {failover,Node} -  Node = node() + StartType = start_type() StartArgs = term() Pid = pid() State = term() -- cgit v1.2.3