aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded
diff options
context:
space:
mode:
authorRichard Carlsson <[email protected]>2016-11-24 13:03:13 +0100
committerRichard Carlsson <[email protected]>2016-11-24 13:27:39 +0100
commit922b0aa7738d773cf96db03f061b7e940adcdd68 (patch)
tree33451317648d7d9b5e3e822fa21da5aa4acc165d /erts/preloaded
parenta834d721e5047c5c43a8ede249fdf6711234ff1b (diff)
downloadotp-922b0aa7738d773cf96db03f061b7e940adcdd68.tar.gz
otp-922b0aa7738d773cf96db03f061b7e940adcdd68.tar.bz2
otp-922b0aa7738d773cf96db03f061b7e940adcdd68.zip
Fix spec for erlang:get_module_info()
Diffstat (limited to 'erts/preloaded')
-rw-r--r--erts/preloaded/src/erlang.erl13
1 files changed, 8 insertions, 5 deletions
diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl
index f502a7cd36..15c3e01653 100644
--- a/erts/preloaded/src/erlang.erl
+++ b/erts/preloaded/src/erlang.erl
@@ -983,9 +983,10 @@ get_keys(_Val) ->
erlang:nif_error(undefined).
%% get_module_info/1
--spec erlang:get_module_info(P1) -> [{atom(), [{atom(), term()}]}] when
- P1 :: atom().
-get_module_info(_P1) ->
+-spec erlang:get_module_info(Module) -> [{Item, term()}] when
+ Item :: module | exports | attributes | compile | native | md5,
+ Module :: atom().
+get_module_info(_Module) ->
erlang:nif_error(undefined).
%% get_stacktrace/0
@@ -1882,10 +1883,12 @@ element(_N, _Tuple) ->
erlang:nif_error(undefined).
%% Not documented
+-type module_info_key() :: attributes | compile | exports | functions | md5
+ | module | native | native_addresses.
-spec erlang:get_module_info(Module, Item) -> ModuleInfo when
Module :: atom(),
- Item :: module | exports | functions | attributes | compile | native_addresses | md5,
- ModuleInfo :: atom() | [] | [{atom(), arity()}] | [{atom(), term()}] | [{atom(), arity(), integer()}].
+ Item :: module_info_key(),
+ ModuleInfo :: term().
get_module_info(_Module, _Item) ->
erlang:nif_error(undefined).